Detailed Description
Connection pooling implementation. This static class provides connection pooling functionality for database connections.
Member Function Documentation
Adds the specified connection to the connection pool and assigns the specified alias.
- Parameters:
-
IConnection | $conn | database connection object |
string | $name | name alias for the connection |
- Exceptions:
-
InvalidArgumentException | when supplied alias already exists |
Implements IPool.
Closes all active connections in the pool.
Implements IPool.
static getByName |
( |
|
$name, |
|
|
|
$connect = TRUE |
|
) |
| |
|
static |
Retrieves previously stored database connection object by its alias.
- Parameters:
-
string | $name | connection name |
boolean | $connect | if TRUE and not yet connected the database connection will be attempted, default TRUE |
- Returns:
- Connection object
- Exceptions:
-
InvalidArgumentException | when supplied alias is not found in the pool |
Implements IPool.
static removeByName |
( |
|
$name, |
|
|
|
$disconnect = TRUE |
|
) |
| |
|
static |
Removes connection from pool
- Parameters:
-
string | $name | connection name |
boolean | $disconnect | whether to disconnect (if connected) first, default TRUE |
- Exceptions:
-
\InvalidArgumentException | when supplied alias is not found in the pool |
Field Documentation
A connections array. Stores connection objects for internal use.
The documentation for this class was generated from the following file: