CoolBrew User Guide Version 1.3
Based on CodeIgniter Version 1.5.4


Database Class

Note: This page is an extension of the CodeIgniter User Guide page of the same name. Please read the CodeIgniter Database Class section in addition to this page for complete information about this feature.

System and Document-Level Config Files

In CodeIgniter, the database config file is stored in the application folder. Since CoolBrew is designed to use multiple modules, and it can be assumed that most of those modules will use the same database configuration, the primary database config file is now system/config/database.php. This file is now required if you want to use the built-in database class.

The database config file can now be augmented at the module and document levels, much like the other config files. CoolBrew looks for database.php files in each of three folders and merges the data it finds:

  1. DOCPATH/config/
  2. system/MODULE_NAME/config/
  3. system/config/

The locations are shown in priority order. In other words, the contents of the first location will take priority over the others, and the contents of the second location will take priority over the third.

See the Config Class page in this guide for more information about how this works.