Advertisement
Guest User

Untitled

a guest
Sep 19th, 2016
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.07 KB | None | 0 0
  1. /**
  2. * @param string $action
  3. * @param string $timeStamp
  4. * @param string $uniqid
  5. * @param string $userName
  6. * @param array $additional
  7. * @param string $adminUser
  8. * @param string $adminPassword
  9. *
  10. * @return SoapServerLog
  11. */
  12. protected function createLogFor($action, $uniqid, $userName, $additional, $adminUser = '', $adminPassword = '', $market)
  13. {
  14. $today=new \DateTime();
  15. $log = new SoapServerLog();
  16. $log->setActionType($action);
  17. $log->setTimestamp($today->format('c'));
  18. $log->setUserName($userName);
  19. $log->setClientUniqid($uniqid);
  20. $log->setAdditionalData($additional);
  21. $log->setConsumer($market);
  22. $this->log = $log;
  23. }
  24.  
  25. /**
  26. * @param string $status
  27. */
  28. protected function saveLog($status = SoapServerLog::PROCESSED, Response $response = null)
  29. {
  30. $this->log->setStatus($status);
  31. $this->log->setResponse($response);
  32. $this->em->persist($this->log);
  33. $this->em->flush($this->log);
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement