Swift_Plugins_AntiFloodPlugin::setThreshold PHP Method

setThreshold() public method

Set the number of emails to send before restarting.
public setThreshold ( integer $threshold )
$threshold integer
    public function setThreshold($threshold)
    {
        $this->_threshold = $threshold;
    }

Usage Example

 public function testThresholdCanBeSetAndFetched()
 {
     $plugin = new Swift_Plugins_AntiFloodPlugin(10);
     $this->assertEquals(10, $plugin->getThreshold());
     $plugin->setThreshold(100);
     $this->assertEquals(100, $plugin->getThreshold());
 }