1. Go to this page and download the library: Download berlioz/config library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
berlioz / config example snippets
use Berlioz\Config\Adapter;
use Berlioz\Config\Config;
$arrayAdapter = new Adapter\ArrayAdapter([/*...*/]);
$iniAdapter = new Adapter\IniAdapter('/path/of-project/config/config.ini', true);
$jsonAdapter = new Adapter\JsonAdapter('/path/of-project/config/config.json', true);
$config = new Config([$arrayAdapter, $jsonAdapter, $iniAdapter]);
print $config->get('foo.bar.qux'); // Print value of configuration
$config = new \Berlioz\Config\Config(/* ... */);
$config->get('foo'); // Returns value of key 'foo'
$config->get('foo.bar'); // Returns value of nested key 'foo.bar'
$config->get('baz', true); // Returns value of key 'baz' or TRUE default value if key does not exist