PHP Class Swift_Plugins_RedirectingPlugin, Halite

Author: Fabien Potencier
Inheritance: implements Swift_Events_SendListener
Mostrar archivo Open project: HaliteChallenge/Halite Class Usage Examples

Public Methods

Method Description
__construct ( mixed $recipient, array $whitelist = [] ) Create a new RedirectingPlugin.
beforeSendPerformed ( Swift_Events_SendEvent $evt ) Invoked immediately before the Message is sent.
getRecipient ( ) : mixed Get the recipient of all messages.
getWhitelist ( ) : array Get the whitelist.
sendPerformed ( Swift_Events_SendEvent $evt ) Invoked immediately after the Message is sent.
setRecipient ( mixed $recipient ) Set the recipient of all messages.
setWhitelist ( array $whitelist ) Set a list of regular expressions to whitelist certain recipients.

Protected Methods

Method Description
_isWhitelisted ( $recipient ) : boolean Matches address against whitelist of regular expressions.

Private Methods

Method Description
_filterHeaderSet ( Swift_Mime_HeaderSet $headerSet, string $type ) Filter header set against a whitelist of regular expressions.
_filterNameAddresses ( array $recipients ) : array Filtered list of addresses => name pairs.
_restoreMessage ( Swift_Mime_Message $message )

Method Details

__construct() public method

Create a new RedirectingPlugin.
public __construct ( mixed $recipient, array $whitelist = [] )
$recipient mixed
$whitelist array

_isWhitelisted() protected method

Matches address against whitelist of regular expressions.
protected _isWhitelisted ( $recipient ) : boolean
$recipient
return boolean

beforeSendPerformed() public method

Invoked immediately before the Message is sent.
public beforeSendPerformed ( Swift_Events_SendEvent $evt )
$evt Swift_Events_SendEvent

getRecipient() public method

Get the recipient of all messages.
public getRecipient ( ) : mixed
return mixed

getWhitelist() public method

Get the whitelist.
public getWhitelist ( ) : array
return array

sendPerformed() public method

Invoked immediately after the Message is sent.
public sendPerformed ( Swift_Events_SendEvent $evt )
$evt Swift_Events_SendEvent

setRecipient() public method

Set the recipient of all messages.
public setRecipient ( mixed $recipient )
$recipient mixed

setWhitelist() public method

Set a list of regular expressions to whitelist certain recipients.
public setWhitelist ( array $whitelist )
$whitelist array