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_ThrottlerPlugin

Throttles the rate at which emails are sent.

Swift_Plugins_BandwidthMonitorPlugin implements Swift_Events_SendListener, Swift_Events_CommandListener, Swift_Events_ResponseListener, Swift_InputByteStream
Extended by Swift_Plugins_ThrottlerPlugin implements Swift_Plugins_Sleeper, Swift_Plugins_Timer
Package: Swift\Plugins
Author: Chris Corbyn
Located at vendors/swiftmailer/lib/classes/Swift/Plugins/ThrottlerPlugin.php

Methods summary

public
# __construct( integer $rate, integer $mode = Swift_Plugins_ThrottlerPlugin::BYTES_PER_MINUTE, Swift_Plugins_Sleeper $sleeper = null, Swift_Plugins_Timer $timer = null )

Create a new ThrottlerPlugin.

Create a new ThrottlerPlugin.

Parameters

$rate
integer
$rate
$mode
integer
$mode, defaults to Swift_Plugins_ThrottlerPlugin::BYTES_PER_MINUTE
$sleeper
Swift_Plugins_Sleeper
$sleeper (only needed in testing)
$timer
Swift_Plugins_Timer
$timer (only needed in testing)
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

Overrides

Swift_Plugins_BandwidthMonitorPlugin::beforeSendPerformed
public
# sendPerformed( Swift_Events_SendEvent $evt )

Invoked when a Message is sent.

Invoked when a Message is sent.

Parameters

$evt
Swift_Events_SendEvent
$evt

Overrides

Swift_Plugins_BandwidthMonitorPlugin::sendPerformed
public
# sleep( integer $seconds )

Sleep for $seconds.

Sleep for $seconds.

Parameters

$seconds
integer
$seconds

Implementation of

Swift_Plugins_Sleeper::sleep()
public integer
# getTimestamp( )

Get the current UNIX timestamp

Get the current UNIX timestamp

Returns

integer

Implementation of

Swift_Plugins_Timer::getTimestamp()
private integer
# _throttleBytesPerMinute( integer $timePassed )

Get a number of seconds to sleep for.

Get a number of seconds to sleep for.

Parameters

$timePassed
integer
$timePassed

Returns

integer
private integer
# _throttleMessagesPerMinute( integer $timePassed )

Get a number of seconds to sleep for.

Get a number of seconds to sleep for.

Parameters

$timePassed
integer
$timePassed

Returns

integer

Methods inherited from Swift_Plugins_BandwidthMonitorPlugin

bind(), commandSent(), commit(), flushBuffers(), getBytesIn(), getBytesOut(), reset(), responseReceived(), unbind(), write()

Magic methods summary

Constants summary

integer BYTES_PER_MINUTE 0x01
#

Flag for throttling in bytes per minute

Flag for throttling in bytes per minute

integer MESSAGES_PER_MINUTE 0x10
#

Flag for throttling in emails per minute

Flag for throttling in emails per minute

Properties summary

private Swift_Plugins_Sleeper $_sleeper
#

The Sleeper instance for sleeping.

The Sleeper instance for sleeping.

private Swift_Plugins_Timer $_timer
#

The Timer instance which provides the timestamp.

The Timer instance which provides the timestamp.

private integer $_start
#

The time at which the first email was sent.

The time at which the first email was sent.

private integer $_rate
#

The rate at which messages should be sent.

The rate at which messages should be sent.

private integer $_mode
#

The mode for throttling. This is Swift_Plugins_ThrottlerPlugin::BYTES_PER_MINUTE or Swift_Plugins_ThrottlerPlugin::MESSAGES_PER_MINUTE

The mode for throttling. This is Swift_Plugins_ThrottlerPlugin::BYTES_PER_MINUTE or Swift_Plugins_ThrottlerPlugin::MESSAGES_PER_MINUTE

private integer $_messages
#

An internal counter of the number of messages sent.

An internal counter of the number of messages sent.

Blesta API documentation generated by ApiGen 2.8.0