Swift_Plugins_ThrottlerPlugin::__construct PHP Method

__construct() public method

Create a new ThrottlerPlugin.
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 function __construct($rate, $mode = self::BYTES_PER_MINUTE, Swift_Plugins_Sleeper $sleeper = null, Swift_Plugins_Timer $timer = null)
    {
        $this->rate = $rate;
        $this->mode = $mode;
        $this->sleeper = $sleeper;
        $this->timer = $timer;
    }