PHP Class Thumper\ConnectionRegistry

Afficher le fichier Open project: php-amqplib/thumper

Protected Properties

Свойство Type Description
$connections PhpAmqpLib\Connection\AbstractConnection[]
$defaultConnection string

Méthodes publiques

Méthode Description
__construct ( array $connections, string $defaultConnection ) ConnectionRegistry constructor.
addConnection ( string $name, PhpAmqpLib\Connection\AbstractConnection $connection ) Add connection to connections registry.
getConnection ( string $name = null ) : PhpAmqpLib\Connection\AbstractConnection Return a connection.

Method Details

__construct() public méthode

ConnectionRegistry constructor.
public __construct ( array $connections, string $defaultConnection )
$connections array Array of connections.
$defaultConnection string Key of default connection.

addConnection() public méthode

Add connection to connections registry.
public addConnection ( string $name, PhpAmqpLib\Connection\AbstractConnection $connection )
$name string Key for connection.
$connection PhpAmqpLib\Connection\AbstractConnection Connection object.

getConnection() public méthode

Return a connection.
public getConnection ( string $name = null ) : PhpAmqpLib\Connection\AbstractConnection
$name string Key of connection to get.
Résultat PhpAmqpLib\Connection\AbstractConnection

Property Details

$connections protected_oe property

protected AbstractConnection[],PhpAmqpLib\Connection $connections
Résultat PhpAmqpLib\Connection\AbstractConnection[]

$defaultConnection protected_oe property

protected string $defaultConnection
Résultat string