mhndev / config
Lightweight configuration file loader that supports PHP, INI, XML, JSON, and YAML files forked from hassankhan/config
Installs: 18 361
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 135
pkg:composer/mhndev/config
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');