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. |
INSERT DESCRIPTION HERE
CSERDModelBase::__construct | ( | ) |
INSERT BRIEF DESCRIPTION HERE.
INSERT FULL DESCRIPTION HERE
Reimplemented from SObject.
static CSERDModelBase::getDBI | ( | ) | [static] |
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.
$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) |