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',

These files reside in directory wa-config/.


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.


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 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 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:


File net.php contains default parameters which must be used for connection to remote resources using waNet class.

Template to create a net.php file:

    'timeout'             => 15,
    'verify'              => true,
    'md5'                 => false,
    'log'                 => false,
    'proxy_host'          => null,
    'proxy_port'          => null,
    'proxy_user'          => null,
    'proxy_password'      => null,
    'interface'           => null,
    'priority'            => array(
    'ssl'                 => array(
        'key'      => '',
        'password' => '',
        'cert'     => '',

You need to leave only those entries in this file which you need to override default values from the options in waNet class.

Array items’ descriptions