Swift
[ class tree: Swift ] [ index: Swift ] [ all elements ]

Class: Swift_Plugins_DecoratorPlugin

Source Location: /vendors/swift/classes/Swift/Plugins/DecoratorPlugin.php

Class Overview


Allows customization of Messages on-the-fly.


Author(s):

  • Chris Corbyn

Implements interfaces:

Methods



Class Details

[line 23]
Allows customization of Messages on-the-fly.



Tags:

author:  Chris Corbyn
filesource:  Source Code for this file


[ Top ]


Class Methods


constructor __construct [line 62]

Swift_Plugins_DecoratorPlugin __construct( mixed $replacements)

Create a new DecoratorPlugin with $replacements.

The $replacements can either be an associative array, or an implementation of Swift_Plugins_Decorator_Replacements.

When using an array, it should be of the form:

  1.  $replacements array(
  2.   "address1@domain.tld" => array("{a}" => "b""{c}" => "d"),
  3.   "address2@domain.tld" => array("{a}" => "x""{c}" => "y")
  4.  )

When using an instance of Swift_Plugins_Decorator_Replacements, the object should return just the array of replacements for the address given to Swift_Plugins_Decorator_Replacements::getReplacementsFor().




Tags:

access:  public


Parameters:

mixed   $replacements  

[ Top ]

method beforeSendPerformed [line 79]

void beforeSendPerformed( Swift_Events_SendEvent $evt)

Invoked immediately before the Message is sent.



Tags:

access:  public



Implementation of:
Swift_Events_SendListener::beforeSendPerformed()
Invoked immediately before the Message is sent.

Parameters:

Swift_Events_SendEvent   $evt  

[ Top ]

method getReplacementsFor [line 142]

array getReplacementsFor( string $address)

Find a map of replacements for the address.

If this plugin was provided with a delegate instance of 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.




Tags:

access:  public



Implementation of:
Swift_Plugins_Decorator_Replacements::getReplacementsFor()
Return the array of replacements for $address.

Parameters:

string   $address  

[ Top ]

method sendPerformed [line 162]

void sendPerformed( Swift_Events_SendEvent $evt)

Invoked immediately after the Message is sent.



Tags:

access:  public



Implementation of:
Swift_Events_SendListener::sendPerformed()
Invoked immediately after the Message is sent.

Parameters:

Swift_Events_SendEvent   $evt  

[ Top ]


Documentation generated on Mon, 05 Sep 2011 20:33:03 -0500 by phpDocumentor 1.4.3