Original sources/based on: http://www.yiiframework.com/doc/cookbook/73/

Link to extension: http://www.yiiframework.com/extension/yii-environment/


Using this you can predefine configurations for use in different environments, like development, testing, staging and production.

The main config is extended to include the Yii path and debug flags. There are mode_x.php files to override and extend the main config for specific implementation. You can optionally use a local config to override these preset configurations, for example when using multiple development instalations with different paths, db’s.

This class was designed to have minimal impact on the default Yii generated files. Minimal changes to the index/bootstrap and existing config files are needed.

The Environment is determined by $_SERVER[YII_ENVIRONMENT], created by Apache’s SetEnv directive. This can be modified in getMode().

Feedback please :)

I would like to get some feedback on it, for example: is it clear to use? does this extension fit your development workflow? can you do everything you could do in the normal config file? are there any features missing?

Just a bump :)

Updated my extension to support console applications :)