PHP Interface Predis\Connection\AggregateConnectionInterface

Author: Daniele Alessandri ([email protected])
Inheritance: extends Predis\Connection\ConnectionInterface
Show file Open project: nrk/predis Interface Usage Examples

Public Methods

Method Description
add ( Predis\Connection\NodeConnectionInterface $connection ) Adds a connection instance to the aggregate connection.
getConnectionByCommand ( Predis\Command\CommandInterface $command ) : Predis\Connection\NodeConnectionInterface Returns the connection instance in charge for the given command.
getConnectionById ( string $connectionID ) : Predis\Connection\NodeConnectionInterface | null Returns a connection instance from the aggregate connection by its alias.
remove ( Predis\Connection\NodeConnectionInterface $connection ) : boolean Removes the specified connection instance from the aggregate connection.

Method Details

add() public method

Adds a connection instance to the aggregate connection.
public add ( Predis\Connection\NodeConnectionInterface $connection )
$connection Predis\Connection\NodeConnectionInterface Connection instance.

getConnectionByCommand() public method

Returns the connection instance in charge for the given command.
public getConnectionByCommand ( Predis\Command\CommandInterface $command ) : Predis\Connection\NodeConnectionInterface
$command Predis\Command\CommandInterface Command instance.
return Predis\Connection\NodeConnectionInterface

getConnectionById() public method

Returns a connection instance from the aggregate connection by its alias.
public getConnectionById ( string $connectionID ) : Predis\Connection\NodeConnectionInterface | null
$connectionID string Connection alias.
return Predis\Connection\NodeConnectionInterface | null

remove() public method

Removes the specified connection instance from the aggregate connection.
public remove ( Predis\Connection\NodeConnectionInterface $connection ) : boolean
$connection Predis\Connection\NodeConnectionInterface Connection instance.
return boolean Returns true if the connection was in the pool.