Database driven setting plugin for CakePHP.
PHP
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
Config
Model
Test
.coveralls.yml
.gitignore
.travis.yml
README.md
composer.json
coveralls.json

README.md

Setting: Database driven setting plugin for CakePHP.

Build Status Coverage Status

Install

First, Install 'Setting' by recipe.php , and set CakePlugin::load('Setting', array('bootstrap' => true));

Second, Create schema.

./lib/Cake/Console/cake schema create settings --plugin Setting

Usage

Init

Configure Setting.settings like Model::validate.

Configure::write('Setting.settings', array(
                                           'tax_rate' => array('rule' => array('numeric')),
                                           ));

Set setting

Setting::setSetting([key], [value]) or Setting::setSetting(array([key1] => [value1], [key2] => [value2]))

Get setting

Setting::getSetting([key]) or Setting::getSetting()

If you want not to use Setting (settings table)

See SystemControlTest.php.

License

the MIT License