Method | Description | |
---|---|---|
__construct ( integer $rate, $mode = self::BYTES_PER_MINUTE, Swift_Plugins_Sleeper $sleeper = null, Swift_Plugins_Timer $timer = null ) | Create a new ThrottlerPlugin. | |
beforeSendPerformed ( Swift_Events_SendEvent $evt ) | Invoked immediately before the Message is sent. | |
getTimestamp ( ) : integer | Get the current UNIX timestamp. | |
sendPerformed ( Swift_Events_SendEvent $evt ) | Invoked when a Message is sent. | |
sleep ( integer $seconds ) | Sleep for $seconds. |
Method | Description | |
---|---|---|
throttleBytesPerMinute ( integer $timePassed ) : integer | Get a number of seconds to sleep for. | |
throttleMessagesPerMinute ( integer $timePassed ) : integer | Get a number of seconds to sleep for. | |
throttleMessagesPerSecond ( integer $timePassed ) : integer | Get a number of seconds to sleep for. |
public __construct ( integer $rate, $mode = self::BYTES_PER_MINUTE, Swift_Plugins_Sleeper $sleeper = null, Swift_Plugins_Timer $timer = null ) | ||
$rate | integer | |
$sleeper | Swift_Plugins_Sleeper | (only needed in testing) |
$timer | Swift_Plugins_Timer | (only needed in testing) |
public beforeSendPerformed ( Swift_Events_SendEvent $evt ) | ||
$evt | Swift_Events_SendEvent |
public getTimestamp ( ) : integer | ||
return | integer |
public sendPerformed ( Swift_Events_SendEvent $evt ) | ||
$evt | Swift_Events_SendEvent |