Geeklog
[ class tree: Geeklog ] [ index: Geeklog ] [ all elements ]

Class: Swift_Plugins_ThrottlerPlugin

Source Location: /system/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/ThrottlerPlugin.php

Class Overview

Swift_Plugins_BandwidthMonitorPlugin
   |
   --Swift_Plugins_ThrottlerPlugin

Throttles the rate at which emails are sent.


Author(s):

  • Chris Corbyn

Implements interfaces:

Constants

Methods


Inherited Methods

Class: Swift_Plugins_BandwidthMonitorPlugin

Swift_Plugins_BandwidthMonitorPlugin::beforeSendPerformed()
Not used.
Swift_Plugins_BandwidthMonitorPlugin::bind()
Attach $is to this stream.
Swift_Plugins_BandwidthMonitorPlugin::commandSent()
Invoked immediately following a command being sent.
Swift_Plugins_BandwidthMonitorPlugin::commit()
Not used.
Swift_Plugins_BandwidthMonitorPlugin::flushBuffers()
Not used.
Swift_Plugins_BandwidthMonitorPlugin::getBytesIn()
Get the total number of bytes received from the server.
Swift_Plugins_BandwidthMonitorPlugin::getBytesOut()
Get the total number of bytes sent to the server.
Swift_Plugins_BandwidthMonitorPlugin::reset()
Reset the internal counters to zero.
Swift_Plugins_BandwidthMonitorPlugin::responseReceived()
Invoked immediately following a response coming back.
Swift_Plugins_BandwidthMonitorPlugin::sendPerformed()
Invoked immediately after the Message is sent.
Swift_Plugins_BandwidthMonitorPlugin::unbind()
Remove an already bound stream.
Swift_Plugins_BandwidthMonitorPlugin::write()
Called when a message is sent so that the outgoing counter can be increased.

Class Details

[line 16]
Throttles the rate at which emails are sent.



Tags:

author:  Chris Corbyn


[ Top ]


Class Methods


constructor __construct [line 79]

Swift_Plugins_ThrottlerPlugin __construct( int $rate, [ $mode = self::BYTES_PER_MINUTE], [Swift_Plugins_Sleeper $sleeper = null], [Swift_Plugins_Timer $timer = null], int $mode,)

Create a new ThrottlerPlugin.



Tags:

access:  public


Parameters:

int   $rate  
int   $mode,   defaults to BYTES_PER_MINUTE
Swift_Plugins_Sleeper   $sleeper   (only needed in testing)
Swift_Plugins_Timer   $timer   (only needed in testing)
   $mode  

[ Top ]

method beforeSendPerformed [line 92]

void beforeSendPerformed( Swift_Events_SendEvent $evt)

Invoked immediately before the Message is sent.



Tags:

access:  public


Overrides Swift_Plugins_BandwidthMonitorPlugin::beforeSendPerformed() (Not used.)

Parameters:

Swift_Events_SendEvent   $evt  

[ Top ]

method getTimestamp [line 150]

int getTimestamp( )

Get the current UNIX timestamp.



Tags:

access:  public



Implementation of:
Swift_Plugins_Timer::getTimestamp()
Get the current UNIX timestamp.
[ Top ]

method sendPerformed [line 125]

void sendPerformed( Swift_Events_SendEvent $evt)

Invoked when a Message is sent.



Tags:

access:  public


Overrides Swift_Plugins_BandwidthMonitorPlugin::sendPerformed() (Invoked immediately after the Message is sent.)

Parameters:

Swift_Events_SendEvent   $evt  

[ Top ]

method sleep [line 136]

void sleep( int $seconds)

Sleep for $seconds.



Tags:

access:  public



Implementation of:
Swift_Plugins_Sleeper::sleep()
Sleep for $seconds.

Parameters:

int   $seconds  

[ Top ]


Class Constants

BYTES_PER_MINUTE =  0x01

[line 19]

Flag for throttling in bytes per minute


[ Top ]

MESSAGES_PER_MINUTE =  0x10

[line 25]

Flag for throttling in emails per minute


[ Top ]

MESSAGES_PER_SECOND =  0x11

[line 22]

Flag for throttling in emails per second (Amazon SES)


[ Top ]



Documentation generated on Sun, 02 Oct 2016 07:56:13 +0000 by phpDocumentor 1.4.3