k1low / setting
Setting: Database driven setting plugin for CakePHP.
Fund package maintenance!
2.0.0
2014-12-25 02:58 UTC
Requires
Requires (Dev)
- phpunit/phpunit: 3.7.*
This package is auto-updated.
Last update: 2026-03-06 11:49:10 UTC
README
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)
License
the MIT License