Documentation

Swift_Plugins_AntiFloodPlugin
in package
implements Swift_Events_SendListener, Swift_Plugins_Sleeper

Reduces network flooding when sending large amounts of mail.

Tags
author

Chris Corbyn

Interfaces, Classes and Traits

Swift_Events_SendListener
Listens for Messages being sent from within the Transport system.
Swift_Plugins_Sleeper
Sleeps for a duration of time.

Table of Contents

$counter  : int
The internal counter.
$sleep  : int
The number of seconds to sleep for during a restart.
$sleeper  : Swift_Plugins_Sleeper
The Sleeper instance for sleeping.
$threshold  : int
The number of emails to send before restarting Transport.
__construct()  : mixed
Create a new AntiFloodPlugin with $threshold and $sleep time.
beforeSendPerformed()  : mixed
Invoked immediately before the Message is sent.
getSleepTime()  : int
Get the number of seconds to sleep for during a restart.
getThreshold()  : int
Get the number of emails to send before restarting.
sendPerformed()  : mixed
Invoked immediately after the Message is sent.
setSleepTime()  : mixed
Set the number of seconds to sleep for during a restart.
setThreshold()  : mixed
Set the number of emails to send before restarting.
sleep()  : mixed
Sleep for $seconds.

Properties

$sleep

The number of seconds to sleep for during a restart.

private int $sleep

$threshold

The number of emails to send before restarting Transport.

private int $threshold

Methods

__construct()

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

public __construct([int $threshold = 99 ], int $sleep[, Swift_Plugins_Sleeper $sleeper = null ]) : mixed
Parameters
$threshold : int = 99
$sleep : int

time

$sleeper : Swift_Plugins_Sleeper = null

(not needed really)

Return values
mixed

getSleepTime()

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

public getSleepTime() : int
Return values
int

getThreshold()

Get the number of emails to send before restarting.

public getThreshold() : int
Return values
int

setSleepTime()

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

public setSleepTime(int $sleep) : mixed
Parameters
$sleep : int

time

Return values
mixed

setThreshold()

Set the number of emails to send before restarting.

public setThreshold(int $threshold) : mixed
Parameters
$threshold : int
Return values
mixed

sleep()

Sleep for $seconds.

public sleep(int $seconds) : mixed
Parameters
$seconds : int
Return values
mixed

Search results