Methods summary
public
|
#
setDependencies( Pimple\Container $container )
Parameters
- $container
- Pimple DI container.
|
protected
Charcoal\Email\EmailQueueItem
|
#
setEmailFactory( Charcoal\Factory\FactoryInterface $factory )
Parameters
- $factory
- The factory to create email objects.
Returns
|
protected
Charcoal\Factory\FactoryInterface
|
|
public
string
|
#
key( )
Get the primary key that uniquely identifies each queue item.
Get the primary key that uniquely identifies each queue item.
Returns
string
|
public
AbstractMessage
|
#
setIdent( string|null $ident )
Set the queue item's ID.
Parameters
- $ident
- The unique queue item identifier.
Returns
AbstractMessage Chainable
Throws
InvalidArgumentException If the identifier is not a string.
|
public
string
|
#
ident( )
Get the queue item's ID.
Returns
string
|
public
Charcoal\Email\EmailQueueItem
|
#
setTo( string|array $email )
Set the recipient's email address.
Set the recipient's email address.
Parameters
Returns
Throws
InvalidArgumentException If the email address is invalid.
|
public
string
|
#
to( )
Get the recipient's email address.
Get the recipient's email address.
Returns
string
|
public
Charcoal\Email\EmailQueueItem
|
#
setFrom( string|array $email )
Set the sender's email address.
Set the sender's email address.
Parameters
Returns
Throws
InvalidArgumentException If the email address is invalid.
|
public
string
|
#
from( )
Get the sender's email address.
Get the sender's email address.
Returns
string
|
public
Charcoal\Email\EmailQueueItem
|
#
setSubject( string $subject )
Set the email subject.
Parameters
- $subject
- The email subject.
Returns
Throws
InvalidArgumentException If the subject is not a string.
|
public
string
|
#
subject( )
Get the email subject.
Returns
string
|
public
Charcoal\Email\EmailQueueItem
|
#
setMsgHtml( string $body )
Set the email's HTML message body.
Set the email's HTML message body.
Parameters
- $body
- The HTML message body.
Returns
Throws
InvalidArgumentException If the message is not a string.
|
public
string
|
#
msgHtml( )
Get the email's HTML message body.
Get the email's HTML message body.
Returns
string
|
public
Charcoal\Email\EmailQueueItem
|
#
setMsgTxt( string $body )
Set the email's plain-text message body.
Set the email's plain-text message body.
Parameters
- $body
- The plain-text mesage body.
Returns
Throws
InvalidArgumentException If the message is not a string.
|
public
string
|
#
msgTxt( )
Get the email's plain-text message body.
Get the email's plain-text message body.
Returns
string
|
public
Charcoal\Email\EmailQueueItem
|
#
setCampaign( string $campaign )
Set the campaign ID.
Parameters
- $campaign
- The campaign identifier.
Returns
Throws
InvalidArgumentException If the campaign is not a string.
|
public
string
|
#
campaign( )
Get the campaign ID.
If it has not been explicitely set, it will be auto-generated (with uniqid).
Returns
string
|
public
boolean
|
#
process( callable $callback = null, callable $successCallback = null, callable $failureCallback = null )
Process the item.
Parameters
- $callback
- An optional callback routine executed after the item is processed.
- $successCallback
- An optional callback routine executed when the item is resolved.
- $failureCallback
- An optional callback routine executed when the item is rejected.
Returns
boolean Success / Failure
|
public
boolean
|
#
preSave( )
Hook called before saving the item.
Hook called before saving the item.
Returns
boolean
See
\Charcoal\Email\Queue\QueueItemTrait::preSaveQueueItem()
|