Blesta
  • Package
  • Class
  • Tree
  • Deprecated

Packages

  • blesta
    • app
      • components
        • events
          • default
      • controllers
      • models
    • components
      • auth
      • delivery
        • interfax
        • postal
          • methods
      • download
      • email
      • exchange
        • rates
          • foxrate
          • google
            • finance
          • yahoo
            • finance
      • gateway
        • payments
      • gateways
      • invoice
        • delivery
        • templates
      • json
      • modules
      • net
        • http
        • net
          • amazon
            • s3
          • geo
            • ip
      • plugins
      • recaptcha
      • security
      • session
        • cart
      • settingscollection
      • upgrades
      • upload
      • vcard
    • helpers
      • currency
        • format
      • data
        • structure
          • array
          • string
      • text
        • parser
  • com
    • tecnick
      • tcpdf
        • blesta
          • components
            • invoice
              • templates
                • quickbooks
                  • invoice
                • templates
                  • default
  • Crypt
    • AES
    • DES
    • Hash
    • Random
    • RC4
    • Rijndael
    • RSA
    • TerraDES
  • File
    • ANSI
    • ASN1
    • X509
  • Math
    • BigInteger
  • minPHP
    • components
      • input
      • record
    • helpers
      • color
      • data
        • structure
      • date
      • html
      • xml
    • lib
  • Net
    • SFTP
    • SSH1
    • SSH2
  • None
  • PHP
  • PHPMailer
  • Services
    • JSON
  • 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

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 vendors/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
mixed
$replacements Array or Swift_Plugins_Decorator_Replacements
public
# setReplacements( mixed $replacements )

Sets replacements.

Sets replacements.

Parameters

$replacements
mixed
$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
Swift_Events_SendEvent
$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
string
$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
Swift_Events_SendEvent
$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

Magic methods summary

Properties summary

private mixed $_replacements
#

The replacement map

The replacement map

private mixed $_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

private array $_originalChildBodies
#

Bodies of children before they are replaced

Bodies of children before they are replaced

private mixed $_lastMessage
#

The Message that was last replaced

The Message that was last replaced

Blesta API documentation generated by ApiGen 2.8.0