Squiz Matrix  4.12.2
 All Data Structures Namespaces Functions Variables Pages
DSNManager Class Reference

Static Public Member Functions

static addDSN ($conn_id= 'db', Array $dsn)
 
static getDSN ($conn_id= 'db')
 
static registerDSNFailure ($conn_id= 'db')
 
static isDSNPool ($conn_id= 'db')
 
static isDSNPoolSupportedConnection ($conn_id= 'db')
 

Detailed Description

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.

Member Function Documentation

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_idThe id of the connection to add DSN
array$dsnThe 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_idThe 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_idThe 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_idThe 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_idThe 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: