24hoursmedia/tesla-silex-configurationmanager

This package is abandoned and no longer maintained. No replacement package was suggested.

configuration manager for sylex

0.1.2 2014-05-16 07:53 UTC

This package is not auto-updated.

Last update: 2020-02-06 00:25:33 UTC


README

Configuration manager for Silex projects

Installation

Add to your composer.json:

"require": {
        "24hoursmedia/tesla-silex-configurationmanager": "0.1.1"
    },

General Usage

Register as a service:

// 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;
    }
);