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

Class: Swift_Plugins_DecoratorPlugin

Source Location: /system/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/DecoratorPlugin.php

Class Overview


Allows customization of Messages on-the-fly.


Author(s):

  • Chris Corbyn
  • Fabien Potencier

Implements interfaces:

Methods



Class Details

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



Tags:

author:  Chris Corbyn
author:  Fabien Potencier


[ Top ]


Class Methods


constructor __construct [line 54]

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   Array or Swift_Plugins_Decorator_Replacements

[ Top ]

method beforeSendPerformed [line 80]

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 156]

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 170]

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 ]

method setReplacements [line 66]

void setReplacements( mixed $replacements)

Sets replacements.



Tags:



Parameters:

mixed   $replacements   Array or Swift_Plugins_Decorator_Replacements

[ Top ]


Documentation generated on Sun, 02 Oct 2016 07:47:17 +0000 by phpDocumentor 1.4.3