public function perform() { $notice = unserialize($this->args['notice']); $configuration = unserialize($this->args['configuration']); $connection = new Connection($configuration); echo $connection->send($notice); }
/** * Notify about the notice. * If there is a notify handler instance supplied, it will be used to handle notification sending. * * @param \Airbrake\Notice $notice * * @return string */ public function notify(Notice $notice) { if (method_exists($this->configuration->notificationHandler, 'sendNotification')) { return $this->configuration->notificationHandler->sendNotification($notice); } else { return $this->connection->send($notice); } }
/** * Notify about the notice. * * If there is a PHP Resque client given in the configuration, then use that to queue up a job to * send this out later. This should help speed up operations. * * @param Notice $notice * @return bool */ public function notify(Notice $notice) { if (class_exists('Resque') && $this->configuration->queue) { $data = array('notice' => serialize($notice), 'configuration' => serialize($this->configuration)); \Resque::enqueue($this->configuration->queue, 'Airbrake\\Resque\\NotifyJob', $data); return true; } return $this->connection->send($notice); }
/** * Notify about the notice. * * @param Notice $notice * @return string|bool */ public function notify(Notice $notice) { return $this->connection->send($notice); }