PHPackages                             rch/config-access-bundle - 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. rch/config-access-bundle

ActiveSymfony-bundle[Utility &amp; Helpers](/categories/utility)

rch/config-access-bundle
========================

Get/set your application config values using dot paths.

v1.0.0(10y ago)3191MITPHPPHP &gt;= 5.4.0

Since Jun 4Pushed 9y ago2 watchersCompare

[ Source](https://github.com/chalasr/RCHConfigAccessBundle)[ Packagist](https://packagist.org/packages/rch/config-access-bundle)[ RSS](/packages/rch-config-access-bundle/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (1)Dependencies (9)Versions (2)Used By (0)

RCHConfigAccessBundle
=====================

[](#rchconfigaccessbundle)

[![Build Status](https://camo.githubusercontent.com/6894fe5c4fc10c2b7522999cef13c389ecca73e2be2571abb85e385503bc54b3/68747470733a2f2f7472617669732d63692e6f72672f6368616c6173722f524348436f6e66696741636365737342756e646c652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/chalasr/RCHConfigAccessBundle)[![StyleCI](https://camo.githubusercontent.com/ac88453c5481a8804224bed050825792aeba8acf297b013d2c7613b51646de9f/68747470733a2f2f7374796c6563692e696f2f7265706f732f35383932383139312f736869656c64)](https://styleci.io/repos/58928191)[![SensioLabsInsight](https://camo.githubusercontent.com/84182bdde26c66952a4861ec3a6adc6c6ca4e2256c8bdd6a4075f25c14ec81e7/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f36613339643333612d663933612d343031362d393566622d6361666430336563326633612f6d696e692e706e67)](https://insight.sensiolabs.com/projects/6a39d33a-f93a-4016-95fb-cafd03ec2f3a)

Retrieve final configuration values from any container-aware context.

Why?
----

[](#why)

In Symfony, when you need to get the value of any configuration (default in `app/config`) the answer is always *parameters*.

But, what about the final configuration? After that the DI container has been compiled? After that compiler passes and bundle extensions changed it or merged it with a default one?

Actuall there is no solution excepted processing the whole configuration of a bundle each time you need it, even partially. This bundle is intended to solve this problem.

Related issues:

- [*Symfony2 accessing variables defined in config?*](http://stackoverflow.com/questions/8544392/symfony2-accessing-variables-defined-in-config-yml-and-config-yml#answer-22603488) (Stack Overflow)
- [*How do I read configuration settings from symfony2 config?*](http://stackoverflow.com/questions/4821692/how-do-i-read-configuration-settings-from-symfony2-config-yml#answer-22599416) (Stack Overflow)

Installation
------------

[](#installation)

#### Download the bundle

[](#download-the-bundle)

```
$ composer require rch/config-access-bundle
```

This command requires you to have [Composer](https://getcomposer.org/doc/00-intro.md) installed globally.

#### Enable the Bundle

[](#enable-the-bundle)

Then, enable the bundle by adding it to the list of registered bundles in the `app/AppKernel.php` file of your project:

```
// app/AppKernel.php

$bundles = array(
    // ...
    new RCH\ConfigAccessBundle\RCHConfigAccessBundle(),
);
```

Usage
-----

[](#usage)

#### Get configuration values

[](#get-configuration-values)

```
