Class Swift_Connection_Multi

Description

Swift Multi Connection

Tries to connect to a number of connections until one works successfully

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

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

The id of the active connection

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

The list of available connections

  • access: protected

Inherited Variables

Inherited from Swift_ConnectionBase

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

Constructor

  • access: public
Swift_Connection_Multi __construct ([ $connections = array()])
  • $connections
addConnection (line 48)

Add a connection to the list of options

  • access: public
void addConnection (Swift_Connection $connection, [string $id = null])
  • Swift_Connection $connection: An instance of the connection
  • string $id: An ID to assign to the connection
getAttributes (line 157)

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 150)

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 129)

Check if the current connection is alive

  • access: public
boolean isAlive ()
postConnect (line 136)

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 63)

Read a full response from the buffer

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

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 88)

Try to start the connection

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

Try to close the connection

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

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:09 +1100 by phpDocumentor 1.3.1