Class Swift_Plugins_AntiFloodPlugin
Inheritance | Swift_Plugins_AntiFloodPlugin |
---|---|
Implements | Swift_Events_SendListener, Swift_Plugins_Sleeper |
Reduces network flooding when sending large amounts of mail.
Public Methods
Method | Description | Defined By |
---|---|---|
__construct() | Create a new AntiFloodPlugin with $threshold and $sleep time. | Swift_Plugins_AntiFloodPlugin |
beforeSendPerformed() | Invoked immediately before the Message is sent. | Swift_Plugins_AntiFloodPlugin |
getSleepTime() | Get the number of seconds to sleep for during a restart. | Swift_Plugins_AntiFloodPlugin |
getThreshold() | Get the number of emails to send before restarting. | Swift_Plugins_AntiFloodPlugin |
sendPerformed() | Invoked immediately after the Message is sent. | Swift_Plugins_AntiFloodPlugin |
setSleepTime() | Set the number of seconds to sleep for during a restart. | Swift_Plugins_AntiFloodPlugin |
setThreshold() | Set the number of emails to send before restarting. | Swift_Plugins_AntiFloodPlugin |
sleep() | Sleep for $seconds. | Swift_Plugins_AntiFloodPlugin |
Method Details
Create a new AntiFloodPlugin with $threshold and $sleep time.
public void __construct ( $threshold = 99, $sleep = 0, Swift_Plugins_Sleeper $sleeper = null ) | ||
$threshold | int | |
$sleep | int | Time |
$sleeper | Swift_Plugins_Sleeper | (not needed really) |
Invoked immediately before the Message is sent.
public void beforeSendPerformed ( Swift_Events_SendEvent $evt ) | ||
$evt | Swift_Events_SendEvent |
Get the number of seconds to sleep for during a restart.
public int getSleepTime ( ) |
Get the number of emails to send before restarting.
public int getThreshold ( ) |
Invoked immediately after the Message is sent.
public void sendPerformed ( Swift_Events_SendEvent $evt ) | ||
$evt | Swift_Events_SendEvent |
Set the number of seconds to sleep for during a restart.
public void setSleepTime ( $sleep ) | ||
$sleep | int | Time |
Set the number of emails to send before restarting.
public void setThreshold ( $threshold ) | ||
$threshold | int |
Sleep for $seconds.
public void sleep ( $seconds ) | ||
$seconds | int |