PHP Class Swift_Plugins_AntiFloodPlugin, Halite

Author: Chris Corbyn
Inheritance: implements Swift_Events_SendListener, implements Swift_Plugins_Sleeper
ファイルを表示 Open project: HaliteChallenge/Halite Class Usage Examples

Public Methods

Method Description
__construct ( integer $threshold = 99, integer $sleep, Swift_Plugins_Sleeper $sleeper = null ) Create a new AntiFloodPlugin with $threshold and $sleep time.
beforeSendPerformed ( Swift_Events_SendEvent $evt ) Invoked immediately before the Message is sent.
getSleepTime ( ) : integer Get the number of seconds to sleep for during a restart.
getThreshold ( ) : integer Get the number of emails to send before restarting.
sendPerformed ( Swift_Events_SendEvent $evt ) Invoked immediately after the Message is sent.
setSleepTime ( integer $sleep ) Set the number of seconds to sleep for during a restart.
setThreshold ( integer $threshold ) Set the number of emails to send before restarting.
sleep ( integer $seconds ) Sleep for $seconds.

Method Details

__construct() public method

Create a new AntiFloodPlugin with $threshold and $sleep time.
public __construct ( integer $threshold = 99, integer $sleep, Swift_Plugins_Sleeper $sleeper = null )
$threshold integer
$sleep integer time
$sleeper Swift_Plugins_Sleeper (not needed really)

beforeSendPerformed() public method

Invoked immediately before the Message is sent.
public beforeSendPerformed ( Swift_Events_SendEvent $evt )
$evt Swift_Events_SendEvent

getSleepTime() public method

Get the number of seconds to sleep for during a restart.
public getSleepTime ( ) : integer
return integer

getThreshold() public method

Get the number of emails to send before restarting.
public getThreshold ( ) : integer
return integer

sendPerformed() public method

Invoked immediately after the Message is sent.
public sendPerformed ( Swift_Events_SendEvent $evt )
$evt Swift_Events_SendEvent

setSleepTime() public method

Set the number of seconds to sleep for during a restart.
public setSleepTime ( integer $sleep )
$sleep integer time

setThreshold() public method

Set the number of emails to send before restarting.
public setThreshold ( integer $threshold )
$threshold integer

sleep() public method

Sleep for $seconds.
public sleep ( integer $seconds )
$seconds integer