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
Requires
- php: >=5.3.0
Requires (Dev)
- phpunit/phpunit: ~4.0
- scrutinizer/ocular: ~1.1
- squizlabs/php_codesniffer: ~2.2
Suggests
- symfony/yaml: ~2.5
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');