Static Public Member Functions | |
| static | setup_connection ($settings, $id='default') |
| Setup a new database connection. | |
| static | get_connection ($id='default') |
| Get an already existing AnewtDatabaseConnection. | |
Static Public Attributes | |
| static | $connections = array() |
| Hash table with database connections. | |
Use this class to setup database connections and to obtain AnewtDatabaseConnection instances.
Definition at line 84 of file database.lib.php.
| static AnewtDatabase::setup_connection | ( | $ | settings, | |
| $ | id = 'default' | |||
| ) | [static] |
Setup a new database connection.
This stores the connection configuration in the database pool. See the AnewtDatabaseConnection (and subclasses) documentation for the description of the settings array.
| $settings | An associative array with connection settings. At least the type key must be provided to specify the database connection type. See AnewtDatabaseConnection for the possible values. | |
| $id | The connection id to use for this connection (optional, defaults to default) |
Definition at line 106 of file database.lib.php.
| static AnewtDatabase::get_connection | ( | $ | id = 'default' |
) | [static] |
Get an already existing AnewtDatabaseConnection.
| $id | The connection id (optional, defaults to default) |
Definition at line 174 of file database.lib.php.
1.5.9