alchemy-fr/Phraseanet — pull request #790 by romainneutron (2013-11-18 09:40:09+00:00)
Title: [3.9] Add configuration property access

This adds a service to allow easy configuration property access :

Imagine we provide this service as $app['conf'] :

```php
// instead of
if (isset($app['configuration']['main']) && isset($app['configuration']['main']['key']) && isset($app['configuration']['main']['key']['subkey'])) {
// ...
}
// lets use :
if ($app['conf']->has(['main', 'key', 'subkey'])) {
// ...
}
```

Various methods are provided :

```php
$app['conf']->get(['main', 'key', 'subkey']);
$app['conf']->set(['main', 'key', 'subkey'], 'value');
$app['conf']->remove(['main', 'key', 'subkey']);
$app['conf']->merge(['main', 'key'], ['subkey2' => 'othervalue']);
```