dependency injection - SF2 : Allow user to configure bundle without checking some part of the bundle configuration -


i'm developping symfony 2 bundle. allow user configure bundle dic without checking part of bundle configuration.

for example, user sets configuration :

root_node:     node:         key1: value1         key2: value2         key3: value3 

and configuration bundle set :

$treebuilder = new treebuilder(); $rootnode = $treebuilder->root('root_node');  $rootnode     ->children()         ->arraynode('node')->children()->end()     ->end(); 

i children nodes of "node" can configure user without been checking bundle configuration. don't know how modify configuration issue.

after reseach on symfony2 github repository, found solution. others want same thing, solution :

$rootnode     ->children()         ->arraynode('node')             ->useattributeaskey('node')->prototype('scalar')->end()         ->end()     ->end(); 

Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -