Overview

Packages

  • akismet
  • None
  • PHP
  • Smarty
    • Cacher
    • Compiler
    • Config
    • Debug
    • plugins
    • PluginsBlock
    • PluginsFilter
    • PluginsFunction
    • PluginsInternal
    • PluginsModifier
    • PluginsModifierCompiler
    • PluginsShared
    • Security
    • Template
    • TemplateResources
  • Swift
    • ByteStream
    • CharacterStream
    • Encoder
    • Events
    • KeyCache
    • Mailer
    • Mime
    • Plugins
    • Signatures
    • Signed
    • Transport
  • wa-apps
    • blog
      • actions
        • backend
        • blog
        • comment
        • cron
        • design
        • frontend
        • page
        • plugin
        • post
      • api
        • v1
      • cli
      • layout
      • model
      • plugin
        • aksimet
        • category
        • emailsubscription
        • favorite
        • gravatar
        • import
        • markdown
        • myposts
        • tag
        • troll
      • settings
    • checklists
      • backend
      • json
    • contacts
      • backend
    • developer
    • dummy
    • guestbook
    • guestbook2
    • photos
      • album
      • api
        • v1
      • backend
      • design
      • dialog
      • frontend
      • page
      • photo
      • plugin
        • comment
        • imageeffects
        • import
        • publicgallery
        • watermark
      • search
      • settings
      • stack
      • tag
      • upload
    • site
      • backend
      • blocks
      • config
      • design
      • domains
      • files
      • frontend
      • helper
      • layout
      • pages
      • routing
      • setting
    • stickies
      • api
        • v1
      • sheet
      • stiky
  • wa-plugin
    • payment
    • shipping
    • sms
  • wa-plugins
    • shipping
      • usps
  • wa-system
    • API
    • Auth
      • Adapters
    • Autoload
    • Cache
      • Adapter
    • Captcha
    • Config
    • Contact
    • controller
    • currency
    • database
    • datetime
    • design
    • event
    • exception
    • files
    • image
    • layout
    • locale
    • log
    • mail
    • page
      • action
      • model
    • payment
    • plugin
    • request
    • response
    • routing
    • shipping
    • sms
    • storage
    • user
    • util
    • validator
    • view
    • webasyst
      • api
      • backend
      • cli
      • config
      • layout
      • login
      • model
      • password
      • payment
      • profile
      • settings
      • shipment
    • widget
    • workflow
  • waPlugins
    • Payment
  • webasyst
    • wa-system
      • helper

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
  • Tree
  • Deprecated
  • Todo

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 wa-system/vendors/swift/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
# _throttleMessagesPerSecond( 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()
Constants summary
integer BYTES_PER_MINUTE 0x01
#

Flag for throttling in bytes per minute

Flag for throttling in bytes per minute

integer MESSAGES_PER_SECOND 0x11
#

Flag for throttling in emails per second (Amazon SES)

Flag for throttling in emails per second (Amazon SES)

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.

The mode for throttling.

This is Swift_Plugins_ThrottlerPlugin::BYTES_PER_MINUTE or Swift_Plugins_ThrottlerPlugin::MESSAGES_PER_MINUTE

private integer $_messages 0
#

An internal counter of the number of messages sent.

An internal counter of the number of messages sent.

My fork of Webasyst Framework API documentation generated by ApiGen 2.8.0