Exemple #1
0
 /**
  * @param int $eventId
  * @return bool|\stdClass|\Stjornvisi\Service\Event
  * @throws NotifyException
  * @throws \Stjornvisi\Service\Exception
  */
 private function getEvent($eventId)
 {
     $event = new \Stjornvisi\Service\Event();
     $event->setDataSource($this->getDataSourceDriver())->setEventManager($this->getEventManager());
     //EVENT
     //	first of all, find the event in question
     if (($event = $event->get($eventId)) != false) {
         return $event;
     } else {
         throw new NotifyException("Event [{$eventId}] not found");
     }
 }