lezhnev74 / dummy-config-loader
This file allows me to lazy load config files and access entries with dot syntax: `database.default.driver`
Package info
github.com/lezhnev74/dummy-config-loader
Type:package
pkg:composer/lezhnev74/dummy-config-loader
v1.0.2
2017-04-14 05:44 UTC
Requires
- php: ^7.0
Requires (Dev)
- phpunit/phpunit: ^6.1
This package is auto-updated.
Last update: 2026-03-01 00:23:14 UTC
README
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