PHP Class Mongolid\Connection\Pool

Afficher le fichier Open project: leroy-merlin-br/mongolid Class Usage Examples

Protected Properties

Свойство Type Description
$connections SplQueue Opened connections.

Méthodes publiques

Méthode Description
__construct ( ) Constructs a connection pool.
addConnection ( Connection $conn ) : boolean Adds a new connection to the pool.
getConnection ( ) : Connection Gets a connection from the pool. It will cycle through the existent connections.

Method Details

__construct() public méthode

Constructs a connection pool.
public __construct ( )

addConnection() public méthode

Adds a new connection to the pool.
public addConnection ( Connection $conn ) : boolean
$conn Connection The actual connection that will be added to the pool.
Résultat boolean Success

getConnection() public méthode

Gets a connection from the pool. It will cycle through the existent connections.
public getConnection ( ) : Connection
Résultat Connection

Property Details

$connections protected_oe property

Opened connections.
protected SplQueue $connections
Résultat SplQueue