Contains a list of redundant Transports so when one fails, the next is used.

package Swift
subpackage Transport
author Chris Corbyn

 Methods

Creates a new FailoverTransport with $transports.

__construct(array $transports) 

Parameters

$transports

array

Get $transports to delegate to.

getTransports() : array
Inherited
inherited_from \Swift_Transport_LoadBalancedTransport::getTransports()
inherited_from \Swift_Transport_FailoverTransport::getTransports()

Returns

arraySwift_Transport

Test if this Transport mechanism has started.

isStarted() : boolean
Inherited
inherited_from \Swift_Transport_LoadBalancedTransport::isStarted()
inherited_from \Swift_Transport_FailoverTransport::isStarted()

Returns

boolean

Create a new FailoverTransport instance.

newInstance(string $transports) : \Swift_FailoverTransport
Static

Parameters

$transports

string

Returns

Register a plugin.

registerPlugin(\Swift_Events_EventListener $plugin) 
Inherited
inherited_from \Swift_Transport_LoadBalancedTransport::registerPlugin()
inherited_from \Swift_Transport_FailoverTransport::registerPlugin()

Parameters

Send the given Message.

send(\Swift_Mime_Message $message, string[] $failedRecipients) : int
Inherited

Recipient/sender data will be retrieved from the Message API. The return value is the number of recipients who were accepted for delivery.

inherited_from \Swift_Transport_FailoverTransport::send()

Parameters

$failedRecipients

string[]

&$failedRecipients to collect failures by-reference

Returns

int

Set $transports to delegate to.

setTransports(array $transports) 
Inherited
inherited_from \Swift_Transport_LoadBalancedTransport::setTransports()
inherited_from \Swift_Transport_FailoverTransport::setTransports()

Parameters

$transports

array

Swift_Transport

Start this Transport mechanism.

start() 
Inherited
inherited_from \Swift_Transport_LoadBalancedTransport::start()
inherited_from \Swift_Transport_FailoverTransport::start()

Stop this Transport mechanism.

stop() 
Inherited
inherited_from \Swift_Transport_LoadBalancedTransport::stop()
inherited_from \Swift_Transport_FailoverTransport::stop()

Rotates the transport list around and returns the first instance.

_getNextTransport() : \Swift_Transport
Inherited
inherited_from \Swift_Transport_FailoverTransport::_getNextTransport()

Returns

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

_killCurrentTransport() 
Inherited
inherited_from \Swift_Transport_FailoverTransport::_killCurrentTransport()

 Properties

 

$_transports : array
Inherited
access protected
inherited_from \Swift_Transport_LoadBalancedTransport::$$_transports
inherited_from \Swift_Transport_FailoverTransport::$$_transports
 

$_currentTransport : \Swift_Transport
Inherited
access private
inherited_from \Swift_Transport_FailoverTransport::$$_currentTransport
 

$_deadTransports 
Inherited
inherited_from \Swift_Transport_LoadBalancedTransport::$$_deadTransports
inherited_from \Swift_Transport_FailoverTransport::$$_deadTransports