Class Database

Description

Database Factory

Generic class to simplify connecting to a database. All database objects should be created by this class to future proof against any internal changes to PICKLES.

Located in /classes/Database.php (line 25)

Object
   |
   --Database
Method Summary
static object instance getInstance ([string $name = null])
Database __construct ([ $name = null])
Variables

Inherited Variables

Inherited from Object

Object::$config
Object::$instances
Methods
static method getInstance (line 54)

Get instance

Looks up the datasource using the passed name and gets an instance of it. Allows for easy sharing of certain classes within the system to avoid the extra overhead of creating new objects each time. Also avoids the hassle of passing around variables (yeah I know, very global-ish)

  • return: of the class
  • access: public
static object instance getInstance ([string $name = null])
  • string $name: name of the datasource

Redefinition of:
Object::getInstance()
Get Instance
Constructor __construct (line 35)

Constructor

Attempts to get an instance of the passed database type or attempts to use a default specified in the config.

  • access: public
Database __construct ([ $name = null])
  • string $name: optional name of the connection to use

Redefinition of:
Object::__construct()
Constructor

Inherited Methods

Inherited From Object

Object::__construct()
Object::getInstance()
Object::__destruct()

Documentation generated on Sun, 17 Oct 2010 23:17:22 -0400 by phpDocumentor 1.4.3