Elgg  Version master
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Elgg\Email\DelayedEmailService Class Reference

Handle storing and processing delayed emails. More...

Public Member Functions

 __construct (DelayedEmailQueueTable $queue_table, EmailService $email, ViewsService $views, Translator $translator, Invoker $invoker)
 Create a new service. More...
 
 enqueueNotification (Notification $notification)
 Queue a notification for delayed email delivery. More...
 
 processQueuedNotifications (string $delivery_interval, int $timestamp)
 Send out notifications for the given delivery_interval. More...
 

Protected Member Functions

 processRecipientNotifications (int $recipient_guid, array $notifications, string $delivery_interval)
 Send out the combined email notification for a given recipient. More...
 

Protected Attributes

 $queue_table
 
 $email
 
 $views
 
 $translator
 
 $invoker
 

Detailed Description

Handle storing and processing delayed emails.

Since
4.0

Definition at line 22 of file DelayedEmailService.php.

Constructor & Destructor Documentation

Elgg\Email\DelayedEmailService::__construct ( DelayedEmailQueueTable  $queue_table,
EmailService  $email,
ViewsService  $views,
Translator  $translator,
Invoker  $invoker 
)

Create a new service.

Parameters
DelayedEmailQueueTable$queue_tablethe queue database table
EmailService$emailemail service
ViewsService$viewsviews service
Translator$translatortranslator service
Invoker$invokerinvoker serivce

Definition at line 60 of file DelayedEmailService.php.

Member Function Documentation

Elgg\Email\DelayedEmailService::enqueueNotification ( Notification  $notification)

Queue a notification for delayed email delivery.

Parameters
Notification$notificationthe notification
Returns
bool

Definition at line 75 of file DelayedEmailService.php.

Elgg\Email\DelayedEmailService::processQueuedNotifications ( string  $delivery_interval,
int  $timestamp 
)

Send out notifications for the given delivery_interval.

Parameters
string$delivery_intervalthe delivery interval to process
int$timestampthe timestamp until which queued notifications should be picked up
Returns
int number of notifications handled

Definition at line 97 of file DelayedEmailService.php.

Elgg\Email\DelayedEmailService::processRecipientNotifications ( int  $recipient_guid,
array  $notifications,
string  $delivery_interval 
)
protected

Send out the combined email notification for a given recipient.

Parameters
int$recipient_guidthe GUID of the recipient
array$notificationsall delayed notifications for the recipient in the given delivery_interval
string$delivery_intervalthe delivery interval
Returns
bool

Definition at line 160 of file DelayedEmailService.php.

Member Data Documentation

Elgg\Email\DelayedEmailService::$email
protected

Definition at line 34 of file DelayedEmailService.php.

Elgg\Email\DelayedEmailService::$invoker
protected

Definition at line 49 of file DelayedEmailService.php.

Elgg\Email\DelayedEmailService::$queue_table
protected

Definition at line 29 of file DelayedEmailService.php.

Elgg\Email\DelayedEmailService::$translator
protected

Definition at line 44 of file DelayedEmailService.php.

Elgg\Email\DelayedEmailService::$views
protected

Definition at line 39 of file DelayedEmailService.php.


The documentation for this class was generated from the following file: