gourmet/aroma
Composer 安装命令:
composer require gourmet/aroma
包简介
DB-based configuration for CakePHP 3.
README 文档
README
DB-based configuration for CakePHP 3.
Install
Using Composer:
composer require gourmet/aroma:^1.0.x-dev
You then need to load the plugin. You can use the shell command:
bin/cake plugin load Gourmet/Aroma
or by manually adding statement shown below to bootstrap.php:
Plugin::load('Gourmet/Aroma');
Usage
For the most basic setup, you don't need to do much:
// config/bootstrap.php use Cake\Core\Configure; use Gourmet\Aroma\Core\Configure\Engine\DbConfig; Configure::config('db', new DbConfig());
If you'd like to use a custom table for storing configuration:
// config/bootstrap.php use Cake\Core\Configure; use Cake\ORM\TableRegistry; use Gourmet\Aroma\Core\Configure\Engine\DbConfig; Configure::config('db', new DbConfig(TableRegistry::get('MyConfigurations')));
Of if you just want to use a different caching engine configuration for storing the database query results:
// config/bootstrap.php use Cake\Core\Configure; use Gourmet\Aroma\Core\Configure\Engine\DbConfig; Configure::config('db', new DbConfig(null, 'customCacheConfigAlias'));
Once you have set it up, you can use like any other Configure engine, using the key you have assigned it:
Configure::read('site_name', 'db'); Configure::write('site_name', 'My Personal Blog', 'db');
Patches & Features
- Fork
- Mod, fix
- Test - this is important, so it's not unintentionally broken
- Commit - do not mess with license, todo, version, etc. (if you do change any, bump them into commits of their own that I can ignore when I pull)
- Pull request - bonus point for topic branches
Bugs & Feedback
http://github.com/gourmet/aroma/issues
License
Copyright (c) 2015, Jad Bitar and licensed under The MIT License.
统计信息
- 总下载量: 608
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 13
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-03-26