Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/kalamu/dynamique-config-bundle

A configuration container independant of Symfony
https://github.com/kalamu/dynamique-config-bundle

Last synced: 6 days ago
JSON representation

A configuration container independant of Symfony

Awesome Lists containing this project

README

        

# Kalamu / Dynamique Config Bundle

This bundle provide a way to define some configuration parameters that are not
dependants of the symfony container. As they are independants, they can be
changed without interfering with Symfony configuration and without clearing the
cache.

This bundle use a parameter container that is persisted in the file
`app/config/dynamique_config.yml`

## Usage

``` php
$config = $container->get('kalamu_dynamique_config');
echo "The background color is : ".$config->get('background_color', 'red'); // get the value of 'background_color' or 'red' if it's not defined
$config->set('background_color', 'blue'); // change the configuration
$config->has('background_color'); // return TRUE
$config->remove('background_color'); // remove this parameter
```