CSERDModelBase Class Reference
[CSERD Model Objects]

Base class for all model objects in this project. More...

Inheritance diagram for CSERDModelBase:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 __construct ()
 INSERT BRIEF DESCRIPTION HERE.

Static Public Member Functions

static getDBI ()
 Retrieves DBI2 object associated with this model set.
static init ($user=false, $server=false)
 Connects to the database and performs other initialization.


Detailed Description

Base class for all model objects in this project.

INSERT DESCRIPTION HERE


Constructor & Destructor Documentation

CSERDModelBase::__construct (  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Returns:
[TYPE]: RETURN DESCRIPTION

Reimplemented from SObject.


Member Function Documentation

static CSERDModelBase::getDBI (  )  [static]

Retrieves DBI2 object associated with this model set.

If the model hasn't been initialized yet, the init() method is called first.

Returns:
[DBI2]: DBI2 object for this model set, or null if it doesn't exist or there is an error calling init()

static CSERDModelBase::init ( user = false,
server = false 
) [static]

Connects to the database and performs other initialization.

Database connection information is stored in the $DB_INFO static array, which you will need to edit and fill in with your database credentials. Information can also come from a global array called $cserd_DB_INFO. The contents of that global array are merged with the contents of $DB_INFO, overwriting any conflicting fields. This way, you can specify suitable defaults in $DB_INFO and override them on a per-checkout basis using the global array.

Additionally, the current DB user and DB server can be overridden by setting the global variables $cserd_DB_USER and $cserd_DB_SERVER, respectively. The user must exist in the list of users in $DB_INFO or $cserd_DB_INFO. You can also specify a user and server as the first and second parameters to this function, respectively.

Further initialization can take place in this function. Simply add code after the TODO comment given at the bottom of the function.

Parameters:
$user [string]: DB user to use when connecting (leave as false to use default)
$server [string]: DB server to connect to (leave as false to use default)
Returns:
[boolean]: success or failure


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

Generated on Wed Nov 24 02:02:02 2010 for Common by  doxygen 1.5.6