Class for notifying users of different events.

Usage is reasonably straightforward:

// Populate the message
$message = array();

// Add content for long notification formats (email and RSS)
$message['title'] = 'Something has happened';
$message['content'] = 'Somebody did something...';

// Add content for short notification formats (XMPP, SMS, Growl)
$message['abstract'] = 'Somebody did something';

// Send it
org_openpsa_notifications::notify('net.example.component:some_action', $recipient_guid, $message);

If you want users to take some action related to the message, it is a good idea to include URLs in the message.

package org.openpsa.notifications

 Methods

load_schemadb ()

notify (string $component_action, string $recipient, array $message)

Sends a notice to a selected person
Static

Parameters

$component_action

stringKey of the event in format component:event

$recipient

stringGUID of the receiving person

$message

arrayNotification message in array format

_list_notifiers ()

_merge_notification_prefences (string $component, string $action, string $recipient)

Find out how a person prefers to get the event notification
Static

Parameters

$component

stringComponent name

$action

stringEvent name

$recipient

stringGUID of the receiving person

Returns

Arrayoptions supported by user