PHP code example of 24hoursmedia / tesla-silex-configurationmanager

1. Go to this page and download the library: Download 24hoursmedia/tesla-silex-configurationmanager 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/ */

    

24hoursmedia / tesla-silex-configurationmanager example snippets


// configure your app for the production environment
$app['config'] = $app->share(
    function () {
        $parameterFile = __DIR__ . '/parameters.json';
        $confDir = __DIR__ . '/conf.d';
        $service = new \Tesla\Silex\ConfigurationManager\ConfigurationManager($parameterFile);
        $service->registerConfigFiles(
            array(
                $confDir . '/conffile1.json',
                $confDir . '/conffile2.conf.json'
            )
        );

        return $service;
    }
);