PHP Class Swift_Plugins_RedirectingPlugin, Halite

Author: Fabien Potencier
Inheritance: implements Swift_Events_SendListener
Afficher le fichier Open project: HaliteChallenge/Halite Class Usage Examples

Méthodes publiques

Méthode 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.

Méthodes protégées

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

Private Methods

Méthode 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 méthode

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

_isWhitelisted() protected méthode

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

beforeSendPerformed() public méthode

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

getRecipient() public méthode

Get the recipient of all messages.
public getRecipient ( ) : mixed
Résultat mixed

getWhitelist() public méthode

Get the whitelist.
public getWhitelist ( ) : array
Résultat array

sendPerformed() public méthode

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

setRecipient() public méthode

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

setWhitelist() public méthode

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