Skip to content

eclogue/ben

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ben

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  
    
    

About

Ben is the name of my old buffalo.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages