This extension is used for read and save config as variables. 简单的设置存储器。
protected/componentsSee the following code example: ~~~
Get config item:
[php] Yii::app()->config->get('site_name', 'Default'); [/php]
Set config item:
[php] Yii::app()->config->set('site_name', 'Yii Site); [/php]
Total 1 comment
To use this extension, you have to add into your configuration file following code:
It is also worth noticing, that comments inside this extension's source files are not in English (Chinese?), so English-speaking users won't find them useful.
For English speaking users, config extension seems to be a better solution. It also introduces use of caching component, which is a vital part of app, when storing settings in DB rather than in a file!
Leave a comment
Please login to leave your comment.