PHP 클래스 Swift_Plugins_DecoratorPlugin, Halite

저자: Chris Corbyn
상속: implements Swift_Events_SendListener, implements Swift_Plugins_Decorator_Replacements
파일 보기 프로젝트 열기: HaliteChallenge/Halite

공개 메소드들

메소드 설명
__construct ( mixed $replacements ) Create a new DecoratorPlugin with $replacements.
beforeSendPerformed ( Swift_Events_SendEvent $evt ) Invoked immediately before the Message is sent.
getReplacementsFor ( string $address ) : array Find a map of replacements for the address.
sendPerformed ( Swift_Events_SendEvent $evt ) Invoked immediately after the Message is sent.
setReplacements ( mixed $replacements ) Sets replacements.

비공개 메소드들

메소드 설명
_restoreMessage ( Swift_Mime_Message $message ) Restore a changed message back to its original state

메소드 상세

__construct() 공개 메소드

The $replacements can either be an associative array, or an implementation of {@link Swift_Plugins_Decorator_Replacements}. When using an array, it should be of the form: $replacements = array( "[email protected]" => array("{a}" => "b", "{c}" => "d"), "[email protected]" => array("{a}" => "x", "{c}" => "y") ) When using an instance of {@link Swift_Plugins_Decorator_Replacements}, the object should return just the array of replacements for the address given to {@link Swift_Plugins_Decorator_Replacements::getReplacementsFor()}.
public __construct ( mixed $replacements )
$replacements mixed Array or Swift_Plugins_Decorator_Replacements

beforeSendPerformed() 공개 메소드

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

getReplacementsFor() 공개 메소드

If this plugin was provided with a delegate instance of {@link Swift_Plugins_Decorator_Replacements} then the call will be delegated to it. Otherwise, it will attempt to find the replacements from the array provided in the constructor. If no replacements can be found, an empty value (NULL) is returned.
public getReplacementsFor ( string $address ) : array
$address string
리턴 array

sendPerformed() 공개 메소드

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

setReplacements() 공개 메소드

Sets replacements.
또한 보기: __construct()
public setReplacements ( mixed $replacements )
$replacements mixed Array or Swift_Plugins_Decorator_Replacements