PHP Class Pommo_Throttler, poMMo

显示文件 Open project: soonick/poMMo Class Usage Examples

Public Methods

Method Description
Pommo_Throttler ( $p, &$history, &$sent, &$sentBytes ) bThrottler() - simple initialization of class variables.
byteTracking ( ) returns status of byte tracking - '1' if disabled, '2' if enabled, '3' if domain enabled, '4' if both enabled
clearQueue ( ) -----------------------------------------------------------
domainCheck ( &$domain ) domainCheck() - validates that a domain has not exceeded its limit per period
domainRelease ( $attempt ) attempts to release an email from the queue or quarantine, after checking with domain controller
loadQueue ( &$queue ) adds more emails to the queue.
mailsInQueue ( ) mailsInQueue() - Returns TRUE if there are mails left to process
pause ( )
pullQueue ( ) pullQueue() - pops & returns an email address from the queue or quarantine. Returns FALSE if throttled back.
pushQueue ( &$q )
release ( ) attempts to release an email from the queue or quarantine
slowBytes ( )
slowdown ( )
smartInit ( ) sets the mode, hP, and cS according to target mails per second
speedup ( )
updateBytes ( $bytes, $domain = FALSE ) updateBytes() - Updates the bytes sent. Called by parent when byte throttling is enabled.

Method Details

Pommo_Throttler() public method

bThrottler() - simple initialization of class variables.
public Pommo_Throttler ( $p, &$history, &$sent, &$sentBytes )

byteTracking() public method

returns status of byte tracking - '1' if disabled, '2' if enabled, '3' if domain enabled, '4' if both enabled
public byteTracking ( )

clearQueue() public method

-----------------------------------------------------------
public clearQueue ( )

domainCheck() public method

domainCheck() - validates that a domain has not exceeded its limit per period
public domainCheck ( &$domain )

domainRelease() public method

attempts to release an email from the queue or quarantine, after checking with domain controller
public domainRelease ( $attempt )

loadQueue() public method

adds more emails to the queue.
public loadQueue ( &$queue )

mailsInQueue() public method

mailsInQueue() - Returns TRUE if there are mails left to process
public mailsInQueue ( )

pause() public method

public pause ( )

pullQueue() public method

pullQueue() - pops & returns an email address from the queue or quarantine. Returns FALSE if throttled back.
public pullQueue ( )

pushQueue() public method

public pushQueue ( &$q )

release() public method

attempts to release an email from the queue or quarantine
public release ( )

slowBytes() public method

public slowBytes ( )

slowdown() public method

public slowdown ( )

smartInit() public method

sets the mode, hP, and cS according to target mails per second
public smartInit ( )

speedup() public method

public speedup ( )

updateBytes() public method

updateBytes() - Updates the bytes sent. Called by parent when byte throttling is enabled.
public updateBytes ( $bytes, $domain = FALSE )