PHP Class Phergie_Connection_Handler, phergie

Author: Phergie Development Team ([email protected])
Inheritance: implements Countable, implements IteratorAggregate
Datei anzeigen Open project: phergie/phergie Class Usage Examples

Protected Properties

Property Type Description
$connections array Map of connections indexed by hostmask

Public Methods

Method Description
__construct ( ) : void Constructor to initialize storage for connections.
addConnection ( Phergie_Connection $connection ) : Phergie_Connection_Handler Adds a connection to the connection list.
count ( ) : integer Returns the number of connections in the list.
getConnections ( array | string $keys = null ) : array Returns a list of specified connection objects.
getIterator ( ) : ArrayIterator Returns an iterator for the connection list.
removeConnection ( Phergie_Connection | string $connection ) : Phergie_Connection_Handler Removes a connection from the connection list.

Method Details

__construct() public method

Constructor to initialize storage for connections.
public __construct ( ) : void
return void

addConnection() public method

Adds a connection to the connection list.
public addConnection ( Phergie_Connection $connection ) : Phergie_Connection_Handler
$connection Phergie_Connection Connection to add
return Phergie_Connection_Handler Provides a fluent interface

count() public method

Returns the number of connections in the list.
public count ( ) : integer
return integer Number of connections

getConnections() public method

Returns a list of specified connection objects.
public getConnections ( array | string $keys = null ) : array
$keys array | string One or more hostmasks identifying the connections to return (optional)
return array List of Phergie_Connection objects corresponding to the specified hostmask(s)

getIterator() public method

Returns an iterator for the connection list.

removeConnection() public method

Removes a connection from the connection list.
public removeConnection ( Phergie_Connection | string $connection ) : Phergie_Connection_Handler
$connection Phergie_Connection | string Instance or hostmask for the connection to remove
return Phergie_Connection_Handler Provides a fluent interface

Property Details

$connections protected_oe property

Map of connections indexed by hostmask
protected array $connections
return array