Static database connectivity support.
Static database connectivity support.
Use this class to setup database connections and to obtain AnewtDatabaseConnection instances.
static 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.
$settingsAn 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.
$idThe connection id to use for this connection (optional, defaults to default)
static get_connection($id='default') [static] ¶Get an already existing AnewtDatabaseConnection.
$idThe connection id (optional, defaults to default)
An AnewtDatabaseConnection instance.