Framework
3.9
|
The ConnectionManager class provides the common point of entry by which DataItems can access the global database connection via the getConnection() method. More...
Static Public Member Functions | |
static | getConnection () |
Retrieves a reference to the global database connection. More... | |
static | newConnection () |
Returns a new connection to the database. More... | |
static | releaseConnection () |
Releases the global connection to the database. More... | |
static | quote ($str) |
Quote a string value based on the character set of the global connection. More... | |
static | escape ($str) |
Escapes a string based on the character set of the global connection. More... | |
static | getVersion () |
Determine the version of the connected database. More... | |
Static Public Attributes | |
static | $dsn |
static | $user |
static | $password |
static | $conn |
static | $options = null |
The ConnectionManager class provides the common point of entry by which DataItems can access the global database connection via the getConnection() method.
The global connection can be manually released via the releaseConnection() method. If needed, additional connections to the database can be created using the newConnection() method. These additional connections can be released simply by setting the variable used to store them to null.
Definition at line 47 of file connection_manager.inc.
|
static |
Escapes a string based on the character set of the global connection.
This is a kludge - try not to use it. I'm adding it for backward compatibility only when migrating to PHP 7 where mysql_escape_string() is no longer available.
string | the string to escape |
Definition at line 129 of file connection_manager.inc.
|
static |
Retrieves a reference to the global database connection.
If no connection to the database has yet been made, one will be created as a result of this call.
Definition at line 59 of file connection_manager.inc.
|
static |
Determine the version of the connected database.
Definition at line 141 of file connection_manager.inc.
|
static |
Returns a new connection to the database.
This is separate from the global connection.
Definition at line 85 of file connection_manager.inc.
|
static |
Quote a string value based on the character set of the global connection.
string | $str | the string to quote |
Definition at line 117 of file connection_manager.inc.
|
static |
Releases the global connection to the database.
Definition at line 106 of file connection_manager.inc.
|
static |
Definition at line 52 of file connection_manager.inc.
|
static |
Definition at line 49 of file connection_manager.inc.
|
static |
Definition at line 53 of file connection_manager.inc.
|
static |
Definition at line 51 of file connection_manager.inc.
|
static |
Definition at line 50 of file connection_manager.inc.