From 3484e2a452196fa5e4066aa4cd23128f152e7e9a Mon Sep 17 00:00:00 2001 From: William DURAND Date: Mon, 11 Apr 2011 13:28:55 +0200 Subject: [PATCH] Fixed Configuration --- DependencyInjection/Configuration.php | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/DependencyInjection/Configuration.php b/DependencyInjection/Configuration.php index bfef4ce..07315c8 100644 --- a/DependencyInjection/Configuration.php +++ b/DependencyInjection/Configuration.php @@ -74,6 +74,7 @@ class Configuration implements ConfigurationInterface * password: null * dsn: xxxxxxxx * options: {} + * attributes: {} * default_connection: xxxxxx */ private function addDbalSection(ArrayNodeDefinition $node) @@ -100,6 +101,13 @@ class Configuration implements ConfigurationInterface ->prototype('scalar')->end() ->end() ->end() + ->fixXmlConfig('attribute') + ->children() + ->arrayNode('attributes') + ->useAttributeAsKey('key') + ->prototype('scalar')->end() + ->end() + ->end() ->fixXmlConfig('connection') ->append($this->getDbalConnectionsNode()) ->end() @@ -117,6 +125,7 @@ class Configuration implements ConfigurationInterface * dsn: xxxxxxxx * classname: PropelPDO * options: {} + * attributes: {} * * @return \Symfony\Component\Config\Definition\Builder\TreeBuilder The tree builder */ @@ -136,13 +145,20 @@ class Configuration implements ConfigurationInterface ->scalarNode('dsn')->defaultValue('')->end() ->scalarNode('classname')->defaultValue($this->debug ? 'DebugPDO' : 'PropelPDO')->end() ->end() - ->fixXmlConfig('options') + ->fixXmlConfig('option') ->children() ->arrayNode('options') ->useAttributeAsKey('key') ->prototype('scalar')->end() ->end() ->end() + ->fixXmlConfig('attribute') + ->children() + ->arrayNode('attributes') + ->useAttributeAsKey('key') + ->prototype('scalar')->end() + ->end() + ->end() ; return $node;