Class Swift_Connection_Rotator

Description

Swift Rotator Connection

Switches through each connection in turn after sending each message

Located in /Swift/Connection/Rotator.php (line 20)

Swift_ConnectionBase
   |
   --Swift_Connection_Rotator
Variable Summary
int $active
array $connections
array $dead
Method Summary
Swift_Connection_Rotator __construct ([ $connections = array()])
void addConnection (Swift_Connection $connection)
int getActive ()
void getAttributes ( $name)
void hasExtension ( $name)
boolean isAlive ()
void nextConnection ()
void postConnect ( $instance)
string read ()
void setExtension ( $extension, [ $attributes = array()])
void start ()
void stop ()
void write (string $command, [ $end = "\r\n"])
Variables
int $active = null (line 31)

The id of the active connection

  • access: protected
array $connections = array() (line 26)

The list of available connections

  • access: protected
array $dead = array() (line 36)

Contains a list of any connections which were tried but found to be dead

  • access: protected

Inherited Variables

Inherited from Swift_ConnectionBase

Swift_ConnectionBase::$extensions
Swift_ConnectionBase::$isESMTP
Methods
Constructor __construct (line 41)

Constructor

  • access: public
Swift_Connection_Rotator __construct ([ $connections = array()])
  • $connections
addConnection (line 52)

Add a connection to the list of options

  • access: public
void addConnection (Swift_Connection $connection)
getActive (line 160)

Get the ID of the active connection

  • access: public
int getActive ()
getAttributes (line 190)

Call the current connection's getAttributes() method

  • access: public
void getAttributes ( $name)
  • $name

Redefinition of:
Swift_ConnectionBase::getAttributes()
Get the list of attributes supported by the given extension
hasExtension (line 183)

Call the current connection's hasExtension() method

  • access: public
void hasExtension ( $name)
  • $name

Redefinition of:
Swift_ConnectionBase::hasExtension()
Check if a given extension has been set as available
isAlive (line 152)

Check if the current connection is alive

  • access: public
boolean isAlive ()
nextConnection (line 65)

Rotate to the next working connection

  • access: public
  • throws: Swift_ConnectionException If no connections are available
void nextConnection ()
postConnect (line 167)

Call the current connection's postConnect() method

  • access: public
void postConnect ( $instance)

Redefinition of:
Swift_ConnectionBase::postConnect()
Execute any needed logic after connecting and handshaking
read (line 107)

Read a full response from the buffer

  • access: public
  • throws: Swift_ConnectionException Upon failure to read
string read ()
setExtension (line 176)

Call the current connection's setExtension() method

  • access: public
void setExtension ( $extension, [ $attributes = array()])
  • $extension
  • $attributes

Redefinition of:
Swift_ConnectionBase::setExtension()
Set an extension which the connection reports to support
start (line 132)

Try to start the connection

  • access: public
  • throws: Swift_ConnectionException Upon failure to start
void start ()
stop (line 140)

Try to close the connection

  • access: public
  • throws: Swift_ConnectionException Upon failure to close
void stop ()
write (line 120)

Write a command to the server (leave off trailing CRLF)

  • access: public
  • throws: Swift_ConnectionException Upon failure to write
void write (string $command, [ $end = "\r\n"])
  • string $command: The command to send
  • $end

Inherited Methods

Inherited From Swift_ConnectionBase

Swift_ConnectionBase::getAttributes()
Swift_ConnectionBase::getRequiresEHLO()
Swift_ConnectionBase::hasExtension()
Swift_ConnectionBase::postConnect()
Swift_ConnectionBase::setExtension()
Swift_ConnectionBase::setRequiresEHLO()

Documentation generated on Wed, 26 Mar 2008 20:33:10 +1100 by phpDocumentor 1.3.1