MandrillTransport
extends Transport
in package
Table of Contents
- $plugins : array<string|int, mixed>
- The plug-ins registered with the transport.
- $client : ClientInterface
- Guzzle client instance.
- $key : string
- The Mandrill API key.
- __construct() : void
- Create a new Mandrill transport instance.
- getKey() : string
- Get the API key being used by the transport.
- isStarted() : bool
- Test if this Transport mechanism has started.
- ping() : bool
- Check if this Transport mechanism is alive.
- registerPlugin() : void
- Register a plug-in with the transport.
- send() : mixed
- {@inheritdoc}
- setKey() : string
- Set the API key being used by the transport.
- start() : mixed
- Start this Transport mechanism.
- stop() : mixed
- Stop this Transport mechanism.
- beforeSendPerformed() : void
- Iterate through registered plugins and execute plugins' methods.
- getTo() : array<string|int, mixed>
- Get all the addresses this message should be sent to.
- numberOfRecipients() : int
- Get the number of recipients.
- sendPerformed() : void
- Iterate through registered plugins and execute plugins' methods.
Properties
$plugins
The plug-ins registered with the transport.
public
array<string|int, mixed>
$plugins
= []
$client
Guzzle client instance.
protected
ClientInterface
$client
$key
The Mandrill API key.
protected
string
$key
Methods
__construct()
Create a new Mandrill transport instance.
public
__construct(ClientInterface $client, string $key) : void
Parameters
- $client : ClientInterface
- $key : string
Return values
void —getKey()
Get the API key being used by the transport.
public
getKey() : string
Return values
string —isStarted()
Test if this Transport mechanism has started.
public
isStarted() : bool
Return values
bool —ping()
Check if this Transport mechanism is alive.
public
ping() : bool
Return values
bool —TRUE if the transport is alive
registerPlugin()
Register a plug-in with the transport.
public
registerPlugin(Swift_Events_EventListener $plugin) : void
Parameters
- $plugin : Swift_Events_EventListener
Return values
void —send()
{@inheritdoc}
public
send(Swift_Mime_SimpleMessage $message[, mixed &$failedRecipients = null ]) : mixed
Parameters
- $message : Swift_Mime_SimpleMessage
- $failedRecipients : mixed = null
Return values
mixed —setKey()
Set the API key being used by the transport.
public
setKey(string $key) : string
Parameters
- $key : string
Return values
string —start()
Start this Transport mechanism.
public
start() : mixed
Return values
mixed —stop()
Stop this Transport mechanism.
public
stop() : mixed
Return values
mixed —beforeSendPerformed()
Iterate through registered plugins and execute plugins' methods.
protected
beforeSendPerformed(Swift_Mime_SimpleMessage $message) : void
Parameters
- $message : Swift_Mime_SimpleMessage
Return values
void —getTo()
Get all the addresses this message should be sent to.
protected
getTo(Swift_Mime_SimpleMessage $message) : array<string|int, mixed>
Note that Mandrill still respects CC, BCC headers in raw message itself.
Parameters
- $message : Swift_Mime_SimpleMessage
Return values
array<string|int, mixed> —numberOfRecipients()
Get the number of recipients.
protected
numberOfRecipients(Swift_Mime_SimpleMessage $message) : int
Parameters
- $message : Swift_Mime_SimpleMessage
Return values
int —sendPerformed()
Iterate through registered plugins and execute plugins' methods.
protected
sendPerformed(Swift_Mime_SimpleMessage $message) : void
Parameters
- $message : Swift_Mime_SimpleMessage