System configs


All framework configuration files are PHP files. Except for rare exceptions, a configuration file contains PHP code returning a named array of parameters as shown below:


return array(
    'param_1' => 'value_1',
    'param_2' => 'value_2',

During development and installation of an application, several system configuration files must be modified. These files reside in directory wa-config/.

File apps.php

File apps.php contains the list of installed applications and allows managing their "visibility" in the main backend menu.

Example of file apps.php:


return array(
    'contacts' => true,
    'stickies' => true,
    'guestbook' => true,
    'installer' => true

APP_ID's of the installed applications are used as the named array keys. Value true for a key tells the system to display the corresponding application name and icon in the framework backend.

File routing.php

This is the system-wide HTTP request routing configuration file which distributes the entire URL space among applications.

Example of system file routing.php:


return array(
    '' => array(
        array('url' => 'blog*', 'app' => 'blog'), 	
        array('url' => 'shop*', 'app' => 'shop'), 	
        array('url' => 'guestbook/*', 'app' => 'guestbook'), 	
        array('url' => '*', 'app' => 'site'), 	  

Read more about frontend request routing.

File db.php

File db.php contains database connection parameters.

Example of file db.php:


return array(
    'default' => array(
        'type' => 'mysql',
        'host' => 'localhost',
        'user' => 'wafw_user',
        'password' => 'my-strong-password',
        'database' => 'wafw'

File config.php

File config.php stores several system settings.

Example of file config.php:


return array(
	'debug' => true,
	'backend_url' => 'admin',
	'mod_rewrite' => true,

Below is the list of parameters used in file config.php: