PHP code example of earthit / config-loader

1. Go to this page and download the library: Download earthit/config-loader 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/ */

    

earthit / config-loader example snippets


$loader = new EarthIT_ConfigLoader( 'database', $_ENV )
echo "Database: "; var_export($loader->get('database'));
echo "Other thing: "; var_export($loader->get('otherthing'));

Database: array (
  driver => 'postgres',
  host => 'db.example.org',
  dbname => 'bobco',
  notes => array (
    'This is the greatest database configuration.',
    'My brother Bob said so.'
  )
)
Other thing: array (
  'foo' => 'jk actually not bar',
  'baz' => 'quux'
)