AnewtDatabase Class Reference

Static database connectivity support. More...

List of all members.

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.


Detailed Description

Static database connectivity support.

Use this class to setup database connections and to obtain AnewtDatabaseConnection instances.

Definition at line 84 of file database.lib.php.


Member Function Documentation

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.

Parameters:
$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)
See also:
AnewtDatabaseConnection

Definition at line 106 of file database.lib.php.

static AnewtDatabase::get_connection ( id = 'default'  )  [static]

Get an already existing AnewtDatabaseConnection.

Parameters:
$id The connection id (optional, defaults to default)
Returns:
An AnewtDatabaseConnection instance.

Definition at line 174 of file database.lib.php.


The documentation for this class was generated from the following file:

Generated on Sun Aug 2 22:54:37 2009 for Anewt by  doxygen 1.5.9