Static Public Member Functions |
static | getInstance () |
static | get ($database= 'studip') |
static | get ($database= 'studip') |
Member Function Documentation
aliasConnection |
( |
|
$new, |
|
|
|
$old |
|
) |
| |
This method creates an alias for a database connection.
- Parameters
-
string | the new key of the database connection |
string | the old key of the database connection |
- Returns
- DBManager this instance, useful for cascading method calls
aliasConnection |
( |
|
$new, |
|
|
|
$old |
|
) |
| |
This method creates an alias for a database connection.
- Parameters
-
string | the new key of the database connection |
string | the old key of the database connection |
- Returns
- DBManager this instance, useful for cascading method calls
static get |
( |
|
$database = 'studip' | ) |
|
|
static |
Shortcut static method to retrieve the database connection for a given key.
- Parameters
-
string | the database connection's key |
- Returns
- PDO the database connection
static get |
( |
|
$database = 'studip' | ) |
|
|
static |
Shortcut static method to retrieve the database connection for a given key.
- Parameters
-
string | the database connection's key |
- Returns
- PDO the database connection
getConnection |
( |
|
$database | ) |
|
This method returns the database connection to the given key. Throws a DBManagerException if there is no such connection.
- Parameters
-
string | the database connection's key |
- Exceptions
-
- Returns
- PDO the database connection
getConnection |
( |
|
$database | ) |
|
This method returns the database connection to the given key. Throws a DBManagerException if there is no such connection.
- Parameters
-
string | the database connection's key |
- Exceptions
-
- Returns
- PDO the database connection
This method returns the singleton instance of this class.
- Returns
- DBManager the singleton instance
This method returns the singleton instance of this class.
- Returns
- DBManager the singleton instance
setConnection |
( |
|
$database, |
|
|
|
$dsn, |
|
|
|
$user, |
|
|
|
$pass |
|
) |
| |
This method creates a database connection and stores it under the given key.
- Parameters
-
string | the key of the database connection |
string | the connection's DSN |
string | the connection's username |
string | the connection's password |
- Returns
- DBManager this instance, useful for cascading method calls
setConnection |
( |
|
$database, |
|
|
|
$dsn, |
|
|
|
$user, |
|
|
|
$pass |
|
) |
| |
This method creates a database connection and stores it under the given key.
- Parameters
-
string | the key of the database connection |
string | the connection's DSN |
string | the connection's username |
string | the connection's password |
- Returns
- DBManager this instance, useful for cascading method calls
The documentation for this class was generated from the following files: