Yii 1.1: configs

Variables Config
1 follower

This extension is used for read and save config as variables. 简单的设置存储器。

Documentation

Requirements

  • Yii 1.0 or above

Installation

  • Extract the release file under protected/components
  • Set up component 'config' in main.php

Usage

See 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]

Change Log

March 3, 2010

  • Initial release.

Total 1 comment

#2261 report it
Trejder at 2010/12/03 06:41am
Configuration and comments

To use this extension, you have to add into your configuration file following code:

...
   'components' => array
      (
      ...
      'config' => array
      (
         'class' => 'application.extensions.XConfig',
      ),
      ...
   ),
...

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 to leave your comment.

Create extension
  • Yii Version: 1.1
  • License: New BSD License
  • Developed by: dongbeta
  • Category: Others
  • Votes: -1
  • Downloaded: 1,157 times
  • Created on: Mar 3, 2010
  • Last updated: Mar 3, 2010