/** * * @param int $notificationTypeId * @param array $vars */ private function createNotification($notificationTypeId, array $vars) { $notificationType = NotificationTypeQuery::create()->findByPK($notificationTypeId); $now = new \Zend_Date(); if ($notificationType instanceof NotificationType) { $notification = NotificationFactory::createFromArray(array('id_notification_type' => $notificationType->getIdNotificationType(), 'created' => $now->get('yyyy-MM-dd HH:mm:ss'), 'dispatched' => 0, 'dispatch_date' => null, 'variables' => json_encode($vars))); $this->getNotificationCatalog()->create($notification); } }
/** * * makeBean * @param array $resultset * @return \Application\Model\Bean\Notification */ protected function makeBean($resultset) { return NotificationFactory::createFromArray($resultset); }