Exemplo n.º 1
0
 public function execute()
 {
     $message = new EdkMessage();
     $message->setArea($this->area);
     $message->setSubject($this->subject);
     $message->setContent($this->content);
     $message->setAuthorName($this->authorName);
     $message->setAuthorEmail($this->authorEmail);
     $message->setAuthorPhone($this->authorPhone);
     $message->setIpAddress(ip2long($_SERVER['REMOTE_ADDR']));
     $this->repository->insert($message);
 }
Exemplo n.º 2
0
 public function changeDuplicateFlag(EdkMessage $item)
 {
     $this->transaction->requestTransaction();
     try {
         if ($item->getDuplicate()) {
             $item->setDuplicate(false);
         } else {
             $item->setDuplicate(true);
         }
         $item->changeState($this->conn);
     } catch (Exception $ex) {
         $this->transaction->requestRollback();
         throw $ex;
     }
 }