k1low / setting
Setting: Database driven setting plugin for CakePHP.
Fund package maintenance!
k1LoW
Installs: 332
Dependents: 0
Suggesters: 0
Security: 0
Stars: 5
Watchers: 3
Forks: 1
Open Issues: 0
Type:cakephp-plugin
Requires
Requires (Dev)
- phpunit/phpunit: 3.7.*
This package is auto-updated.
Last update: 2024-11-06 09:10:21 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