XOOPS RMCommon Utilities  2.1.8.91RC
 All Classes Namespaces Files Functions Variables
Swift_Plugins_AntiFloodPlugin Class Reference
Inheritance diagram for Swift_Plugins_AntiFloodPlugin:
Inheritance graph

Public Member Functions

 __construct ($threshold=99, $sleep=0, Swift_Plugins_Sleeper $sleeper=null)
 
 beforeSendPerformed (Swift_Events_SendEvent $evt)
 
 getSleepTime ()
 
 getThreshold ()
 
 sendPerformed (Swift_Events_SendEvent $evt)
 
 setSleepTime ($sleep)
 
 setThreshold ($threshold)
 
 sleep ($seconds)
 

Private Attributes

 $_counter = 0
 
 $_sleep
 
 $_sleeper
 
 $_threshold
 

Detailed Description

Definition at line 21 of file AntiFloodPlugin.php.

Constructor & Destructor Documentation

Swift_Plugins_AntiFloodPlugin::__construct (   $threshold = 99,
  $sleep = 0,
Swift_Plugins_Sleeper  $sleeper = null 
)

Create a new AntiFloodPlugin with $threshold and $sleep time.

Parameters
int$threshold
int$sleeptime
Swift_Plugins_Sleeper$sleeper(not needed really)

Definition at line 59 of file AntiFloodPlugin.php.

References setSleepTime(), and setThreshold().

Here is the call graph for this function:

Member Function Documentation

Swift_Plugins_AntiFloodPlugin::beforeSendPerformed ( Swift_Events_SendEvent  $evt)

Invoked immediately before the Message is sent.

Parameters
Swift_Events_SendEvent$evt

Implements Swift_Events_SendListener.

Definition at line 107 of file AntiFloodPlugin.php.

Swift_Plugins_AntiFloodPlugin::getSleepTime ( )

Get the number of seconds to sleep for during a restart.

Returns
int

Definition at line 98 of file AntiFloodPlugin.php.

References $_sleep.

Swift_Plugins_AntiFloodPlugin::getThreshold ( )

Get the number of emails to send before restarting.

Returns
int

Definition at line 80 of file AntiFloodPlugin.php.

References $_threshold.

Swift_Plugins_AntiFloodPlugin::sendPerformed ( Swift_Events_SendEvent  $evt)

Invoked immediately after the Message is sent.

Parameters
Swift_Events_SendEvent$evt

Implements Swift_Events_SendListener.

Definition at line 115 of file AntiFloodPlugin.php.

References $_counter, Swift_Events_SendEvent\getTransport(), and sleep().

Here is the call graph for this function:

Swift_Plugins_AntiFloodPlugin::setSleepTime (   $sleep)

Set the number of seconds to sleep for during a restart.

Parameters
int$sleeptime

Definition at line 89 of file AntiFloodPlugin.php.

Referenced by __construct().

Here is the caller graph for this function:

Swift_Plugins_AntiFloodPlugin::setThreshold (   $threshold)

Set the number of emails to send before restarting.

Parameters
int$threshold

Definition at line 71 of file AntiFloodPlugin.php.

Referenced by __construct().

Here is the caller graph for this function:

Swift_Plugins_AntiFloodPlugin::sleep (   $seconds)

Sleep for $seconds.

Parameters
int$seconds

Implements Swift_Plugins_Sleeper.

Definition at line 135 of file AntiFloodPlugin.php.

Referenced by sendPerformed().

Here is the caller graph for this function:

Member Data Documentation

Swift_Plugins_AntiFloodPlugin::$_counter = 0
private

Definition at line 44 of file AntiFloodPlugin.php.

Referenced by sendPerformed().

Swift_Plugins_AntiFloodPlugin::$_sleep
private

Definition at line 37 of file AntiFloodPlugin.php.

Referenced by getSleepTime().

Swift_Plugins_AntiFloodPlugin::$_sleeper
private

Definition at line 51 of file AntiFloodPlugin.php.

Swift_Plugins_AntiFloodPlugin::$_threshold
private

Definition at line 30 of file AntiFloodPlugin.php.

Referenced by getThreshold().


The documentation for this class was generated from the following file: