Merging main.php and command.php config files


I was searching for a good solution to have the yii config files consistent when using yiic commands.

So the best way to merge main.php and command.php config files is the following I illustrate with command.php


// This is the configuration for yiic console application.

// Any writable CConsoleApplication properties can be configured here.


$mainConfigArray = include dirname(__FILE__).DIRECTORY_SEPARATOR.'main.php';

return array(  



	'name'=>'Cronjob Application',


















                                        'levels'=>'error, warning',













So all to do is, include the main.php config file and reuse the settings by putting the matching arrays (keys) into the console configuration.

Hope that helps !