Exemplo n.º 1
0
 /**
  * @param string $body
  */
 private function notify($body)
 {
     if (!$this->notifier) {
         return;
     }
     $notification = (new Notification())->setTitle($this->getProjectName())->setBody($body)->setIcon(__DIR__ . '/../Resources/logo.png');
     $this->notifier->send($notification);
 }
Exemplo n.º 2
0
 /**
  * @param array $record
  *
  * @return bool
  *
  * @throws \Joli\JoliNotif\Exception\InvalidNotificationException
  */
 protected function write(array $record)
 {
     $this->notification->setTitle(sprintf('[%s] %s', Logger::getLevelName($this->level), $this->name))->setBody(addslashes($record['formatted']));
     return $this->notifier && $this->notifier->send($this->notification);
 }