public function notify(MaestroNotification &$obj)
 {
     if (is_array($obj->getUserIDs())) {
         foreach ($obj->getUserIDs() as $userID) {
             //send a twitter update however that is done :-)
             //echo "twitter update to userID:" . $userID;
         }
     }
 }
示例#2
0
function test_observers()
{
    include 'maestro_notification.class.php';
    $notification = new MaestroNotification(1, 'this is a test message', 'Sample Subject', 0);
    $notification->notify();
}
 function sendTaskReminderNotifications($qid = 0, $user_id = 0)
 {
     include_once 'maestro_notification.class.php';
     if ($qid == 0) {
         $qid = $this->_queueId;
     }
     $message = variable_get('maestro_reminder_message');
     $subject = variable_get('maestro_reminder_subject');
     $notification = new MaestroNotification($message, $subject, $qid, MaestroNotificationTypes::REMINDER);
     if ($user_id != 0) {
         $notification->setUserIDs($user_id);
     }
     $notification->notify();
 }