PHP code example of mad-tools / environment-provider

1. Go to this page and download the library: Download mad-tools/environment-provider 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/ */

    

mad-tools / environment-provider example snippets


$cfg = __DIR__.'/env/mapper.ini';

$provider = \EnvironmentProvider\Provider::initWithINIFile($cfg);
$config = $provider->Config();

var_dump($config->get());
var_dump($config->get('group-1'));
var_dump($config->get('group-1', 'option'));
var_dump($config->get('group-1', 'option', 'g1'));