[ Index ]

MailPress 544

[ Index ]     [ Classes ]     [ Functions ]     [ Variables ]     [ Constants ]     [ Statistics ]    

title

Body

[close]

/mp-includes/Swiftmailer/classes/Swift/Plugins/ -> DecoratorPlugin.php (summary)

(no description)

File Size: 207 lines (7 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

Swift_Plugins_DecoratorPlugin:: (6 methods):
  __construct()
  setReplacements()
  beforeSendPerformed()
  getReplacementsFor()
  sendPerformed()
  _restoreMessage()


Class: Swift_Plugins_DecoratorPlugin  - X-Ref

Allows customization of Messages on-the-fly.

__construct($replacements)   X-Ref
Create a new DecoratorPlugin with $replacements.

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:
<code>
$replacements = array(
"address1@domain.tld" => array("{a}" => "b", "{c}" => "d"),
"address2@domain.tld" => array("{a}" => "x", "{c}" => "y")
)
</code>

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()}.

param: mixed $replacements Array or Swift_Plugins_Decorator_Replacements

setReplacements($replacements)   X-Ref
Sets replacements.

param: mixed $replacements Array or Swift_Plugins_Decorator_Replacements

beforeSendPerformed(Swift_Events_SendEvent $evt)   X-Ref
Invoked immediately before the Message is sent.

param: Swift_Events_SendEvent $evt

getReplacementsFor($address)   X-Ref
Find a map of replacements for the address.

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.

param: string $address
return: array

sendPerformed(Swift_Events_SendEvent $evt)   X-Ref
Invoked immediately after the Message is sent.

param: Swift_Events_SendEvent $evt

_restoreMessage(Swift_Mime_Message $message)   X-Ref
No description



Generated: Thu Apr 28 18:38:52 2016 Cross-referenced by PHPXref 0.7.1