DSNManager.
DSNManager class stores the list of DSN and DSNPool objects of the connections using the connection ids like 'db', 'db2', etc
DSNManager class also provides the methods to process the DSN list.
- Since
- 4.0.0
Definition at line 27 of file DSNManager.inc.
static addDSN |
( |
|
$conn_id = 'db' , |
|
|
Array |
$dsn |
|
) |
| |
|
static |
Represent a DSN array with a DSN or DSNPool object and add it to the DSN list
- Parameters
-
string | $conn_id | The id of the connection to add DSN |
array | $dsn | The DSN to add to the list |
- Returns
- boolean Return TRUE if the DSN can be added; Return FALSE if it is already in the list public
Definition at line 57 of file DSNManager.inc.
static getDSN |
( |
|
$conn_id = 'db' | ) |
|
|
static |
Get the DSN array of a connection. If the connection has a DSN Pool, it will return the DSN array of a random DSN in the Pool.
- Parameters
-
string | $conn_id | The id of the connection to get the DSN from |
- Returns
- NULL|array The DSN array of a single DSN object or the DSN array of a random DNS object in the DSN Pool. Return NULL if there is no DSN for the connection. public
Definition at line 96 of file DSNManager.inc.
static isDSNPool |
( |
|
$conn_id = 'db' | ) |
|
|
static |
Check if a connection has a DSN pool.
- Parameters
-
string | $conn_id | The id of the connection to check |
- Returns
- boolean Return TRUE if the connection has a DSN Pool; otherwise, return FALSE public
Definition at line 130 of file DSNManager.inc.
static isDSNPoolSupportedConnection |
( |
|
$conn_id = 'db' | ) |
|
|
static |
Check if the connection supports DSN Pool.
- Parameters
-
string | $conn_id | The id of the connection to check |
- Returns
- boolean Return TRUE if the connection supports DSN Pool; otherwise, return FALSE public
Definition at line 148 of file DSNManager.inc.
static registerDSNFailure |
( |
|
$conn_id = 'db' | ) |
|
|
static |
Register failure for the current DSN in the DSN Pool.
- Parameters
-
string | $conn_id | The id of the connection to register DSN failure |
- Returns
- void public
Definition at line 114 of file DSNManager.inc.
The documentation for this class was generated from the following file: