PHP code example of jomisacu / configloader

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

    

jomisacu / configloader example snippets


 // [config root dir]/[selected environment]/default.php file

$config['system_timezone'] = 'Americas/Santo_Domingo';







// for specific environment values.
// represents a sub directory on config files root directory
// it's a string and can exists any number of environments
$environment = \Jomisacu\ConfigLoader::ENV_DEVELOPMENT; 

// directory where resides configuration environments dirs
// -+ config (config root)
//	|-- development
//	|-- production
//	|-- testing
//	|-- qa
//	|-- example
//	|-- ... 
$configFilesRootDir = __DIR__ . '/config';

// configuration files to be loaded automatically
$autoloadFiles = ['default'];

$config = \Jomisacu\ConfigLoaderFactory::create($configFilesRootDir, $environment, $autoloadFiles);