Class Swift_Plugin_AntiFlood

Description

Implements interfaces:

Swift AntiFlood controller.

Closes a connection and pauses for X seconds after a number of emails have been sent.

Located in /Swift/Plugin/AntiFlood.php (line 20)


	
			
Variable Summary
int $count
int $waitFor
Method Summary
Swift_Plugin_AntiFlood __construct (int $threshold, [int $wait = 0])
int getThreshold ()
int getWait ()
void sendPerformed ( $e)
void setThreshold (int $threshold)
void setWait (int $time)
void wait (int $seconds)
Variables
int $count = 0 (line 36)

Number of emails sent so far

  • access: protected
int $threshold = null (line 26)

The number of emails to send between connections

  • access: protected
int $waitFor = null (line 31)

The number of seconds to pause for between connections

  • access: protected
Methods
Constructor __construct (line 43)

Constructor

  • access: public
Swift_Plugin_AntiFlood __construct (int $threshold, int $wait)
  • int $threshold: Number of emails to send before re-connecting
  • int $wait: The timeout in seconds between connections
getThreshold (line 60)

Get the number of emails which need to be sent for reconnection to occur

  • access: public
int getThreshold ()
getWait (line 76)

Get the number of seconds the plugin should wait for before re-connecting

  • access: public
int getWait ()
sendPerformed (line 94)

Swift's SendEvent listener.

Invoked when Swift sends a message

  • access: public
  • throws: Swift_ConnectionException If the connection cannot be closed/re-opened
void sendPerformed ( $e)
setThreshold (line 52)

Set the number of emails which must be sent for a reconnection to occur

  • access: public
void setThreshold (int $threshold)
  • int $threshold: Number of emails
setWait (line 68)

Set the number of seconds the plugin should wait for before reconnecting

  • access: public
void setWait (int $time)
  • int $time: Time in seconds
wait (line 84)

Sleep for a given number of seconds

  • access: public
void wait (int $seconds)
  • int $seconds: Number of seconds to wait for

Documentation generated on Wed, 26 Mar 2008 20:33:02 +1100 by phpDocumentor 1.3.1