How can I extend the config.php file

Hi guys,

I’d like know if can I create another php file (or any thing like it) and call in default yii config.php.

I’m creating a module that need a differentiated configuration, and to not write every time the same rules on config.php I’d like create a separated file and call it on config.php file.

It’s possible?

Thanks.

From webdi comment on cookbook page:

http://www.yiiframework.com/doc/cookbook/52/

example /protected/config/db.php:

return array(

'connectionString'=>'my_connection_string',


'username'=>'my_user',


'password'=>'my_password',


'charset'=>'utf8'

);

in /protected/config/main.php:

‘db’=>require(dirname(FILE).’/db.php’),

hope it helps!

regards!

CMap::mergeArray() can help you