Class Swift_Plugins_DecoratorPlugin

(line 23)

Description


Located in File: /vendors/swiftMailer/classes/Swift/Plugins/DecoratorPlugin.php

Allows customization of Messages on-the-fly.


Class Variables

Summary:

Class Constants

Summary:

Method Detail

Summary:
Swift_Plugins_DecoratorPlugin __construct (mixed $replacements)
array getReplacementsFor (string $address)

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

Parameters

  • mixed $replacements:

Info

  • access - public

Method beforeSendPerformed (line 79)

void beforeSendPerformed( Swift_Events_SendEvent $evt)


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

Parameters

Info

  • access - public

Method getReplacementsFor (line 142)

array getReplacementsFor( string $address)


Implementation of:
Swift_Plugins_Decorator_Replacements::getReplacementsFor()
Return the array of replacements for $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.

Parameters

  • string $address:

Info

  • access - public

Method sendPerformed (line 162)

void sendPerformed( Swift_Events_SendEvent $evt)


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

Parameters

Info

  • access - public

Inherited Variables

Inherited Class Variable Summary

Inherited Methods

Inherited Method Summary


Documentation generated on Fri, 12 Nov 2010 20:45:18 +0000 by phpDocumentor 1.4.3