dev-master
9999999-dev https://github.com/gourmet/aromaDB-based configuration for CakePHP 3.
MIT
The Requires
The Development Requires
by Jad Bitar
by Others
cakephp gourmet
DB-based configuration for CakePHP 3.
DB-based configuration for CakePHP 3., (*2)
Using Composer:, (*3)
composer require gourmet/aroma:^1.0.x-dev
You then need to load the plugin. You can use the shell command:, (*4)
bin/cake plugin load Gourmet/Aroma
or by manually adding statement shown below to bootstrap.php
:, (*5)
Plugin::load('Gourmet/Aroma');
For the most basic setup, you don't need to do much:, (*6)
// 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:, (*7)
// 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:, (*8)
// 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:, (*9)
Configure::read('site_name', 'db'); Configure::write('site_name', 'My Personal Blog', 'db');
http://github.com/gourmet/aroma/issues, (*10)
Copyright (c) 2015, Jad Bitar and licensed under The MIT License., (*11)
DB-based configuration for CakePHP 3.
MIT
cakephp gourmet