Example #1
0
 public function addLog(Webhook $webhook, Response $response)
 {
     $this->getLogRepository()->removeOldLogs($webhook->getId(), $this->logMax);
     $log = new Log();
     $log->setWebhook($webhook);
     $log->setStatusCode($response->code);
     $log->setDateAdded(new \DateTime());
     $webhook->addLog($log);
     $this->saveEntity($webhook);
 }
 /**
  * {@inheritDoc}
  */
 public function setDateAdded($dateAdded)
 {
     $this->__initializer__ && $this->__initializer__->__invoke($this, 'setDateAdded', array($dateAdded));
     return parent::setDateAdded($dateAdded);
 }