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

2.0.0 2014-12-25 02:58 UTC

This package is auto-updated.

Last update: 2024-11-06 09:10:21 UTC


README

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