mhndev/config

Lightweight configuration file loader that supports PHP, INI, XML, JSON, and YAML files forked from hassankhan/config

1.0.0 2017-03-30 09:33 UTC

This package is auto-updated.

Last update: 2024-11-06 10:03:17 UTC


README

forked from hassankhan/config the one and only difference which I made is : access config values by file name

<?php
use Noodlehaus\Config;

// Load all supported files in a directory
$conf = new Config(__DIR__ . '/config');

consider in mentioned path we have multiple config file and one of them is mail.php and it's content is as follow

<?php
return [ 
       'driver'=>'file'
];

now you can access this variable like follow :

// Get value using key
$debug = $conf->get('mail.driver');