PHP Class nineinchnick\nfy\components\MailQueue

Subscriptions are tracked using a different queue.
Inheritance: extends nineinchnick\nfy\components\Queue
Show file Open project: nineinchnick/yii2-nfy

Public Properties

Property Type Description
$composeCallback a callable to compose a new email using the message body
$mailer mailer through which messages are sent and which credentials are used to check email
$recipientCallback a callable to fetch recipients email using a subscriber id
$sendToSubscriptionQueue set to true to also send the message to the subscription queue
$subscriptionQueue queue used to track subscriptions

Public Methods

Method Description
delete ( $message_id, $subscriber_id = null )
getSubscriptions ( $subscriber_id = null )
init ( )
isSubscribed ( $subscriber_id, $category = null )
peek ( $subscriber_id = null, $limit, $status = Message::AVAILABLE )
receive ( $subscriber_id = null, $limit )
release ( $message_id, $subscriber_id = null )
releaseTimedout ( )
reserve ( $subscriber_id = null, $limit )
send ( $message, $category = null )
subscribe ( $subscriber_id, $label = null, $categories = null, $exceptions = null )
unsubscribe ( $subscriber_id, $categories = null )

Protected Methods

Method Description
createMessage ( string $body ) : yii\mail\MessageInterface Creates an instance of a Message.

Method Details

createMessage() protected method

This method may be overriden in extending classes.
protected createMessage ( string $body ) : yii\mail\MessageInterface
$body string message body
return yii\mail\MessageInterface

delete() public method

public delete ( $message_id, $subscriber_id = null )

getSubscriptions() public method

public getSubscriptions ( $subscriber_id = null )

init() public method

public init ( )

isSubscribed() public method

public isSubscribed ( $subscriber_id, $category = null )

peek() public method

public peek ( $subscriber_id = null, $limit, $status = Message::AVAILABLE )

receive() public method

public receive ( $subscriber_id = null, $limit )

release() public method

public release ( $message_id, $subscriber_id = null )

releaseTimedout() public method

public releaseTimedout ( )

reserve() public method

public reserve ( $subscriber_id = null, $limit )

send() public method

public send ( $message, $category = null )

subscribe() public method

public subscribe ( $subscriber_id, $label = null, $categories = null, $exceptions = null )

unsubscribe() public method

public unsubscribe ( $subscriber_id, $categories = null )

Property Details

$composeCallback public property

a callable to compose a new email using the message body
public $composeCallback

$mailer public property

mailer through which messages are sent and which credentials are used to check email
public $mailer

$recipientCallback public property

a callable to fetch recipients email using a subscriber id
public $recipientCallback

$sendToSubscriptionQueue public property

set to true to also send the message to the subscription queue
public $sendToSubscriptionQueue

$subscriptionQueue public property

queue used to track subscriptions
public $subscriptionQueue