コード例 #1
0
ファイル: EmailListener.php プロジェクト: Eximagen/sochi
 /**
  *
  * @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);
     }
 }
コード例 #2
0
 /**
  *
  * makeBean
  * @param array $resultset
  * @return \Application\Model\Bean\Notification
  */
 protected function makeBean($resultset)
 {
     return NotificationFactory::createFromArray($resultset);
 }