Skip to content

lezhnev74/dummy-config-loader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Latest Stable Version Build Status License Total Downloads

Usage

$config = new DummyConfigLoader\Config(__DIR__); // this will look for config files in this folder
$value = $config->get('database.default.driver', 'mongodb');

You will get mariadb as $value if you will place file database.php in the given folder with contents:

return [
    "default" => [
        "driver" => "mariadb"
    ]
];

Otherwise you will get mongodb.

First section of any key addresses the file within the directory. One level of recursion allowed. If no such file found in the folder - exception will be thrown.

Installation

composer require lezhnev74/dummy-config-loader

Support

If you need help - feel comfortable to ping me at lezhnev.work@gmail.com

About

Access configuration values from PHP arrays with dot syntax: `database.default.driver`

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages