PHP Класс Mongolid\Connection\Pool

Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$connections SplQueue Opened connections.

Открытые методы

Метод Описание
__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.

Описание методов

__construct() публичный метод

Constructs a connection pool.
public __construct ( )

addConnection() публичный метод

Adds a new connection to the pool.
public addConnection ( Connection $conn ) : boolean
$conn Connection The actual connection that will be added to the pool.
Результат boolean Success

getConnection() публичный метод

Gets a connection from the pool. It will cycle through the existent connections.
public getConnection ( ) : Connection
Результат Connection

Описание свойств

$connections защищенное свойство

Opened connections.
protected SplQueue $connections
Результат SplQueue