\NotificationService
NotificationService
- Author: marcus@silverstripe.com.au, shea@livesource.co.nz
- License: http://silverstripe.org/bsd-license/
Synopsis
class NotificationService
extends Object
{
- // members
- private static array $default_senders = ;
- private static array $default_channels = ;
- private static Boolean $use_queues = true;
- protected $senders;
- protected $channels;
- // methods
- public void __construct()
- public void addChannel()
- public void setChannels()
- public void addSender()
- public void setSenders()
- public void getSender()
- public void notify()
- public void sendNotification()
- public void sendToUser()
Hierarchy
Extends
- Object
Members
private
- $default_channels
—
array
The list of channels to send to by default - $default_senders
—
array
The default notification send mechanisms to init with - $use_queues
—
Boolean
Should we use the queued jobs approach to sending notifications?
protected
- $channels
—
array
The list of channels to send to - $senders
—
array
The objects to use for actually sending a notification, indexed by their channel ID
Methods
public
- __construct()
- addChannel() — Add a channel that this notification service should use when sending notifications
- addSender() — Add a notification sender
- getSender() — Get a sender for a particular channel
- notify() — Trigger a notification event
- sendNotification() — Send out a notification
- sendToUser() — Sends a notification directly to a user
- setChannels() — Set the list of channels this notification service should use when sending notifications
- setSenders() — Add a notification sender to a channel