PHP Class Swift_Transport_LoadBalancedTransport, Halite

Author: Chris Corbyn
Inheritance: implements Swift_Transport
Show file Open project: HaliteChallenge/Halite Class Usage Examples

Protected Properties

Property Type Description
$_lastUsedTransport Swift_Transport The Transport used in the last successful send operation.
$_transports Swift_Transport[] The Transports which are used in rotation.

Public Methods

Method Description
__construct ( ) needed as __construct is called from elsewhere explicitly
getLastUsedTransport ( ) : Swift_Transport Get the Transport used in the last successful send operation.
getTransports ( ) : Swift_Transport[] Get $transports to delegate to.
isStarted ( ) : boolean Test if this Transport mechanism has started.
registerPlugin ( Swift_Events_EventListener $plugin ) Register a plugin.
send ( Swift_Mime_Message $message, string[] &$failedRecipients = null ) : integer Send the given Message.
setTransports ( array $transports ) Set $transports to delegate to.
start ( ) Start this Transport mechanism.
stop ( ) Stop this Transport mechanism.

Protected Methods

Method Description
_getNextTransport ( ) : Swift_Transport Rotates the transport list around and returns the first instance.
_killCurrentTransport ( ) Tag the currently used (top of stack) transport as dead/useless.

Method Details

__construct() public method

needed as __construct is called from elsewhere explicitly
public __construct ( )

_getNextTransport() protected method

Rotates the transport list around and returns the first instance.
protected _getNextTransport ( ) : Swift_Transport
return Swift_Transport

_killCurrentTransport() protected method

Tag the currently used (top of stack) transport as dead/useless.
protected _killCurrentTransport ( )

getLastUsedTransport() public method

Get the Transport used in the last successful send operation.
public getLastUsedTransport ( ) : Swift_Transport
return Swift_Transport

getTransports() public method

Get $transports to delegate to.
public getTransports ( ) : Swift_Transport[]
return Swift_Transport[]

isStarted() public method

Test if this Transport mechanism has started.
public isStarted ( ) : boolean
return boolean

registerPlugin() public method

Register a plugin.
public registerPlugin ( Swift_Events_EventListener $plugin )
$plugin Swift_Events_EventListener

send() public method

Recipient/sender data will be retrieved from the Message API. The return value is the number of recipients who were accepted for delivery.
public send ( Swift_Mime_Message $message, string[] &$failedRecipients = null ) : integer
$message Swift_Mime_Message
$failedRecipients string[] An array of failures by-reference
return integer

setTransports() public method

Set $transports to delegate to.
public setTransports ( array $transports )
$transports array

start() public method

Start this Transport mechanism.
public start ( )

stop() public method

Stop this Transport mechanism.
public stop ( )

Property Details

$_lastUsedTransport protected property

The Transport used in the last successful send operation.
protected Swift_Transport $_lastUsedTransport
return Swift_Transport

$_transports protected property

The Transports which are used in rotation.
protected Swift_Transport[] $_transports
return Swift_Transport[]