mojavi
[ class tree: mojavi ] [ index: mojavi ] [ all elements ]

Class: Database

Source Location: /database/Database.class.php

Class Overview

ParameterHolder
   |
   --Database

Database is a base abstraction class that allows you to setup any type of database connection via a configuration file.


Author(s):

  • Sean Kerr (skerr@mojavi.org)

Version:

  • $Id: Database.class.php 612 2004-12-07 03:14:53Z seank $

Copyright:

Variables

Methods


Child classes:

PostgreSQLDatabase
PostgreSQLDatabase provides connectivity for the PostgreSQL brand database.
PDODatabase
PDODatabase provides connectivity for the PDO database abstraction layer.
MySQLDatabase
MySQLDatabase provides connectivity for the MySQL brand database.
CreoleDatabase
CreoleDatabase provides connectivity for the Creole database abstraction layer.

Inherited Variables

Inherited Methods

Class: ParameterHolder

ParameterHolder::clearParameters()
Clear all parameters associated with this request.
ParameterHolder::getParameter()
Retrieve a parameter.
ParameterHolder::getParameterNames()
Retrieve an array of parameter names.
ParameterHolder::getParameters()
Retrieve an array of parameters.
ParameterHolder::hasParameter()
Indicates whether or not a parameter exists.
ParameterHolder::removeParameter()
Remove a parameter.
ParameterHolder::setParameter()
Set a parameter.
ParameterHolder::setParameterByRef()
Set a parameter by reference.
ParameterHolder::setParameters()
Set an array of parameters.
ParameterHolder::setParametersByRef()
Set an array of parameters by reference.

Class Details

[line 24]
Database is a base abstraction class that allows you to setup any type of database connection via a configuration file.



Tags:

abstract:  
version:  $Id: Database.class.php 612 2004-12-07 03:14:53Z seank $
since:  3.0.0
copyright:  (c) Sean Kerr, http://www.mojavi.org
author:  Sean Kerr (skerr@mojavi.org)


[ Top ]


Class Variables

$connection =  null

[line 32]



Tags:

access:  protected

Type:   mixed


[ Top ]

$resource =  null

[line 33]


Type:   mixed


[ Top ]



Class Methods


method connect [line 47]

void connect( )

Connect to the database.



Tags:

abstract:  
since:  3.0.0
author:  Sean Kerr (skerr@mojavi.org)
throws:  DatabaseException If a connection could not be created.


Overridden in child classes as:

PostgreSQLDatabase::connect()
Connect to the database.
PDODatabase::connect()
Connect to the database.
MySQLDatabase::connect()
Connect to the database.
CreoleDatabase::connect()
Connect to the database.

[ Top ]

method getConnection [line 62]

mixed getConnection( )

Retrieve the database connection associated with this Database implementation.

When this is executed on a Database implementation that isn't an abstraction layer, a copy of the resource will be returned.




Tags:

return:  A database connection.
access:  public
throws:  DatabaseException If a connection could not be retrieved.


[ Top ]

method getResource [line 86]

mixed getResource( )

Retrieve a raw database resource associated with this Database implementation.



Tags:

return:  A database resource.
access:  public
throws:  DatabaseException If a resource could not be retrieved.


[ Top ]

method initialize [line 116]

bool initialize( [array $parameters = null])

Initialize this Database.



Tags:

return:  true, if initialization completes successfully, otherwise false.
access:  public
since:  3.0.0
author:  Sean Kerr (skerr@mojavi.org)
throws:  InitializationException If an error occurs while initializing this Database.


Parameters:

array   $parameters   An associative array of initialization parameters.

[ Top ]

method shutdown [line 141]

void shutdown( )

Execute the shutdown procedure.



Tags:

abstract:  
since:  3.0.0
author:  Sean Kerr (skerr@mojavi.org)
throws:  DatabaseException If an error occurs while shutting down this database.


Overridden in child classes as:

PostgreSQLDatabase::shutdown()
Execute the shutdown procedure.
PDODatabase::shutdown()
Execute the shutdown procedure.
MySQLDatabase::shutdown()
Execute the shutdown procedure.
CreoleDatabase::shutdown()
Execute the shutdown procedure.

[ Top ]


Documentation generated on Tue, 21 Feb 2006 01:45:14 +0900 by phpDocumentor 1.3.0RC5