21/05
2017
Wallogit.com
2017 © Pedro Peláez
light config component
light config component, (*1)
composer require "flatphp/config"
use Flatphp\Config\BaseArray as Config
Config::set(array(
'db' => array(
'host' => 'localhost',
'port' => '3306',
'username' => 'test',
'password' => '123456',
'dbname' => 'test'
),
'redis' => array(
'host' => 'localhost',
'port' => '6379'
)
));
$db_config = Config::get('db');
use Flatphp\Config\BaseArray as Config
Config::set('key', 'value');