eclogue / ben
php config
Installs: 43
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 0
Type:scv
Requires
- pimple/pimple: ^3.1
Requires (Dev)
- phpunit/phpunit: ^6.1
This package is not auto-updated.
Last update: 2024-11-08 17:12:10 UTC
README
Ben is the name of my old buffalo.This project is designed to manage the configuration file.
#usage
use Ben\Config;
-
Config::set($key, $val = '')
$key
string or array if $key use.
connection, it will be considered as get value from multi-dimensional arrays by index. For example:Config::set('test.foo'); // look like $config['test']['foo'];
if $key is array it will be merged
-
Config::get($key)
$key
string support use.
connector to search multi-dimensional arrays. For example:Config::get('test.foo')
-
load configure file from path
Config::load($path, $defaul = 'default.php')
Config::load('./config/develop.php');
-
support auto load by command line arguments
// set path Config::load('./config'); // run script php demo.php --env staging