PHPackages                             devture/silex-provider-config - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. devture/silex-provider-config

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

devture/silex-provider-config
=============================

Silex (Pimple) provider for configuration management

2.0(9y ago)33.1kBSDPHP

Since Feb 23Pushed 9y ago1 watchersCompare

[ Source](https://github.com/spantaleev/silex-provider-config)[ Packagist](https://packagist.org/packages/devture/silex-provider-config)[ RSS](/packages/devture-silex-provider-config/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (1)Versions (4)Used By (0)

Silex Config Provider
=====================

[](#silex-config-provider)

A configuration provider for the [Silex](http://silex.sensiolabs.org/) micro-framework.

Usage
-----

[](#usage)

The configuration loader uses the concept of *configuration* files (containing the configuration skeleton) and *parameter* files (variables that customize the configuration).

Moving some configuration values outside of the config skeleton allows config files to be commited to version control and remain identical everywhere, while leaving certain "parameters" up for customization.

*Parameter files* can be provided to the library as file paths or as PHP arrays of values. The latter is useful whenever you want to grab some environment variables.

Example configuration:

```
//config.json
{
        "key": "value",
        "something": "%something%",
        "websites": {
                "first": "%main_website%",
                "second": "%another_website%"
        }
}

//parameters.json
{
        "something": "value for something",
        "main_website": "http://devture.com/",
        "another_website": "http://github.com/spantaleev"
}
```

Usage:

```
