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 ([String $name = null])
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
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 ([String $name = null])
  • string $name: optional name of the connection to use

Documentation generated on Wed, 03 Oct 2012 17:46:05 -0400 by phpDocumentor 1.4.4