Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/kalamu/dynamique-config-bundle
- Owner: kalamu
- License: mit
- Created: 2019-06-18T11:37:30.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-08-13T13:48:34.000Z (over 5 years ago)
- Last Synced: 2024-05-07T05:02:28.287Z (6 months ago)
- Language: PHP
- Size: 10.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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
```