Overview

Packages

  • CONTENIDO
  • Core
    • Authentication
    • Backend
    • Cache
    • CEC
    • Chain
    • ContentType
    • Database
    • Debug
    • Exception
    • Frontend
      • Search
      • URI
      • Util
    • GenericDB
      • Model
    • GUI
      • HTML
    • I18N
    • LayoutHandler
    • Log
    • Security
    • Session
    • Util
    • Validation
    • Versioning
    • XML
  • Module
    • ContentRssCreator
    • ContentSitemapHtml
    • ContentSitemapXml
    • ContentUserForum
    • NavigationTop
    • ScriptCookieDirective
  • mpAutoloaderClassMap
  • None
  • Plugin
    • ContentAllocation
    • CronjobOverview
    • FormAssistant
    • FrontendLogic
    • FrontendUsers
    • Linkchecker
    • ModRewrite
    • Newsletter
    • Repository
      • FrontendNavigation
      • KeywordDensity
    • SearchSolr
    • SmartyWrapper
    • UrlShortener
    • UserForum
    • Workflow
  • PluginManager
  • Setup
    • Form
    • GUI
    • Helper
      • Environment
      • Filesystem
      • MySQL
      • PHP
    • UpgradeJob
  • Smarty
    • Cacher
    • Compiler
    • Config
    • Debug
    • PluginsBlock
    • PluginsFilter
    • PluginsFunction
    • PluginsInternal
    • PluginsModifier
    • PluginsModifierCompiler
    • PluginsShared
    • Security
    • Template
    • TemplateResources
  • Swift
    • ByteStream
    • CharacterStream
    • Encoder
    • Events
    • KeyCache
    • Mailer
    • Mime
    • Plugins
    • Transport

Classes

  • Swift_Plugins_AntiFloodPlugin
  • Swift_Plugins_BandwidthMonitorPlugin
  • Swift_Plugins_DecoratorPlugin
  • Swift_Plugins_ImpersonatePlugin
  • Swift_Plugins_LoggerPlugin
  • Swift_Plugins_MessageLogger
  • Swift_Plugins_PopBeforeSmtpPlugin
  • Swift_Plugins_RedirectingPlugin
  • Swift_Plugins_ReporterPlugin
  • Swift_Plugins_Reporters_HitReporter
  • Swift_Plugins_Reporters_HtmlReporter
  • Swift_Plugins_ThrottlerPlugin

Interfaces

  • Swift_Plugins_Decorator_Replacements
  • Swift_Plugins_Pop_Pop3Connection
  • Swift_Plugins_Reporter
  • Swift_Plugins_Sleeper
  • Swift_Plugins_Timer
  • Overview
  • Package
  • Class
  • Todo
  • Download

Class Swift_Plugins_DecoratorPlugin

Allows customization of Messages on-the-fly.

Swift_Plugins_DecoratorPlugin implements Swift_Events_SendListener, Swift_Plugins_Decorator_Replacements
Package: Swift\Plugins
Author: Chris Corbyn
Author: Fabien Potencier
Located at classes/swiftmailer/lib/classes/Swift/Plugins/DecoratorPlugin.php
Methods summary
public
# __construct( mixed $replacements )

Create a new DecoratorPlugin with $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:

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

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

$replacements
Array or Swift_Plugins_Decorator_Replacements
public
# setReplacements( mixed $replacements )

Sets replacements.

Sets replacements.

Parameters

$replacements
Array or Swift_Plugins_Decorator_Replacements

See

Swift_Plugins_DecoratorPlugin::__construct()
public
# beforeSendPerformed( Swift_Events_SendEvent $evt )

Invoked immediately before the Message is sent.

Invoked immediately before the Message is sent.

Parameters

$evt

Implementation of

Swift_Events_SendListener::beforeSendPerformed()
public array
# getReplacementsFor( string $address )

Find a map of replacements for the 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

$address

Returns

array

Implementation of

Swift_Plugins_Decorator_Replacements::getReplacementsFor()
public
# sendPerformed( Swift_Events_SendEvent $evt )

Invoked immediately after the Message is sent.

Invoked immediately after the Message is sent.

Parameters

$evt

Implementation of

Swift_Events_SendListener::sendPerformed()
private
# _restoreMessage( Swift_Mime_Message $message )

Restore a changed message back to its original state

Restore a changed message back to its original state

Properties summary
private $_replacements

The replacement map

The replacement map

#
private $_originalBody

The body as it was before replacements

The body as it was before replacements

#
private array $_originalHeaders

The original headers of the message, before replacements

The original headers of the message, before replacements

# array()
private array $_originalChildBodies

Bodies of children before they are replaced

Bodies of children before they are replaced

# array()
private $_lastMessage

The Message that was last replaced

The Message that was last replaced

#
CMS CONTENIDO 4.9.7 API documentation generated by ApiGen