## Class Swift_Transport_LoadBalancedTransport

(line 22)

## Description

Located in File: /vendors/swiftMailer/classes/Swift/Transport/LoadBalancedTransport.php

##### Redudantly and rotationally uses several Transports when sending.

- author: - Chris Corbyn

Classes extended from Swift_Transport_LoadBalancedTransport:

Swift_LoadBalancedTransport
  Redudantly and rotationally uses several Transport implementations when sending.

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

## Class Variables

Summary:
array $_transports

#### $_transports = array() (line 34)

#### Data type : array

##### The Transports which are used in rotation.

- var: - Swift_Transport
- access: - protected

## Class Constants

Summary:

## Method Detail

Summary:
Swift_Transport_LoadBalancedTransport __construct ()
array getTransports ( $transports)
boolean isStarted ()
void registerPlugin (Swift_Events_EventListener $plugin)
int send (Swift_Mime_Message $message, [string[] &$failedRecipients = null])
void setTransports ( $transports)
void start ()
void stop ()
Swift_Transport _getNextTransport ()
void _killCurrentTransport ()

#### Constructor __construct (line 39)

#### Swift_Transport_LoadBalancedTransport __construct( )

Overridden in child classes as:

Swift_LoadBalancedTransport::__construct()
  Creates a new LoadBalancedTransport with $transports.

Swift_Transport_FailoverTransport::__construct()
  Creates a new FailoverTransport.

Swift_FailoverTransport::__construct()
  Creates a new FailoverTransport with $transports.

##### Creates a new LoadBalancedTransport.

#### Info

- access - public

#### Method getTransports (line 59)

#### array getTransports( $transports)

##### Get $transports to delegate to.

#### Parameters

- array $transports:

#### Info

- return - Swift_Transport
- access - public

#### Method isStarted (line 69)

#### boolean isStarted( )

Implementation of:

Swift_Transport::isStarted()
  Test if this Transport mechanism has started.

##### Test if this Transport mechanism has started.

#### Info

- access - public

#### Method registerPlugin (line 143)

#### void registerPlugin( Swift_Events_EventListener $plugin)

Implementation of:

Swift_Transport::registerPlugin()
  Register a plugin in the Transport.

##### Register a plugin.

#### Parameters

- Swift_Events_EventListener $plugin:

#### Info

- access - public

#### Method send (line 103)

#### int send( Swift_Mime_Message $message, [string[] &$failedRecipients = null])

Overridden in child classes as:

Swift_Transport_FailoverTransport::send()
  Send the given Message.

Implementation of:

Swift_Transport::send()
  Send the given Message.

##### Send the given Message.

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

#### Parameters

- Swift_Mime_Message $message:
- string[] &$failedRecipients: to collect failures by-reference

#### Info

- access - public

#### Method setTransports (line 48)

#### void setTransports( $transports)

##### Set $transports to delegate to.

#### Parameters

- array $transports: Swift_Transport

#### Info

- access - public

#### Method start (line 77)

#### void start( )

Implementation of:

Swift_Transport::start()
  Start this Transport mechanism.

##### Start this Transport mechanism.

#### Info

- access - public

#### Method stop (line 85)

#### void stop( )

Implementation of:

Swift_Transport::stop()
  Stop this Transport mechanism.

##### Stop this Transport mechanism.

#### Info

- access - public

#### Method _getNextTransport (line 159)

#### Swift_Transport _getNextTransport( )

Overridden in child classes as:

Swift_Transport_FailoverTransport::_getNextTransport()

##### Rotates the transport list around and returns the first instance.

#### Info

- access - protected

#### Method _killCurrentTransport (line 173)

#### void _killCurrentTransport( )

Overridden in child classes as:

Swift_Transport_FailoverTransport::_killCurrentTransport()

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

#### Info

- access - protected

## Inherited Variables

### Inherited Class Variable Summary

## Inherited Methods

### Inherited Method Summary

Documentation generated on Fri, 12 Nov 2010 20:45:23 +0000 by phpDocumentor 1.4.3