lezhnev74/dummy-config-loader

This file allows me to lazy load config files and access entries with dot syntax: `database.default.driver`

v1.0.2 2017-04-14 05:44 UTC

This package is auto-updated.

Last update: 2024-02-29 03:23:44 UTC


README

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