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 setWebhook($webhook) { $this->__initializer__ && $this->__initializer__->__invoke($this, 'setWebhook', array($webhook)); return parent::setWebhook($webhook); }