From e4a9b70fb369c2b0028392280954c2cffb029a87 Mon Sep 17 00:00:00 2001 From: Francis Besset Date: Mon, 22 Jul 2013 11:52:32 +0200 Subject: [PATCH] [SoapBundle] Fixed Configuration.php --- .../DependencyInjection/Configuration.php | 86 +++++++++---------- 1 file changed, 42 insertions(+), 44 deletions(-) diff --git a/src/BeSimple/SoapBundle/DependencyInjection/Configuration.php b/src/BeSimple/SoapBundle/DependencyInjection/Configuration.php index c56f3c9..f7fa94d 100644 --- a/src/BeSimple/SoapBundle/DependencyInjection/Configuration.php +++ b/src/BeSimple/SoapBundle/DependencyInjection/Configuration.php @@ -49,16 +49,17 @@ class Configuration ->children() ->arrayNode('cache') ->addDefaultsIfNotSet() - ->children() - ->scalarNode('type') - ->defaultValue('disk') - ->validate() - ->ifNotInArray($this->cacheTypes) - ->thenInvalid(sprintf('The cache type has to be either %s', implode(', ', $this->cacheTypes))) + ->children() + ->scalarNode('type') + ->defaultValue('disk') + ->validate() + ->ifNotInArray($this->cacheTypes) + ->thenInvalid(sprintf('The cache type has to be either %s', implode(', ', $this->cacheTypes))) + ->end() ->end() + ->scalarNode('lifetime')->defaultNull()->end() + ->scalarNode('limit')->defaultNull()->end() ->end() - ->scalarNode('lifetime')->defaultNull()->end() - ->scalarNode('limit')->defaultNull()->end() ->end() ->end() ->end() @@ -71,20 +72,21 @@ class Configuration ->children() ->arrayNode('clients') ->useAttributeAsKey('name') - ->prototype('array') - ->children() - ->scalarNode('wsdl')->isRequired()->end() - ->scalarNode('user_agent')->end() - ->scalarNode('cache_type') - ->validate() - ->ifNotInArray($this->cacheTypes) - ->thenInvalid(sprintf('The cache type has to be either %s', implode(', ', $this->cacheTypes))) + ->prototype('array') + ->children() + ->scalarNode('wsdl')->isRequired()->end() + ->scalarNode('user_agent')->end() + ->scalarNode('cache_type') + ->validate() + ->ifNotInArray($this->cacheTypes) + ->thenInvalid(sprintf('The cache type has to be either %s', implode(', ', $this->cacheTypes))) + ->end() + ->end() + ->arrayNode('classmap') + ->useAttributeAsKey('name')->prototype('scalar')->end() + ->end() ->end() ->end() - ->arrayNode('classmap') - ->useAttributeAsKey('name') - ->prototype('scalar') - ->end() ->end() ->end() ->end() @@ -97,28 +99,23 @@ class Configuration ->children() ->arrayNode('services') ->useAttributeAsKey('name') - ->prototype('array') - ->children() - ->scalarNode('namespace') - ->isRequired() - ->end() - ->scalarNode('resource') - ->defaultValue('*') - ->end() - ->scalarNode('resource_type') - ->defaultValue('annotation') - ->end() - ->scalarNode('binding') - ->defaultValue('document-wrapped') - ->validate() - ->ifNotInArray(array('rpc-literal', 'document-wrapped')) - ->thenInvalid("Service binding style has to be either 'rpc-literal' or 'document-wrapped'") + ->prototype('array') + ->children() + ->scalarNode('namespace')->isRequired()->end() + ->scalarNode('resource')->defaultValue('*')->end() + ->scalarNode('resource_type')->defaultValue('annotation')->end() + ->scalarNode('binding') + ->defaultValue('document-wrapped') + ->validate() + ->ifNotInArray(array('rpc-literal', 'document-wrapped')) + ->thenInvalid("Service binding style has to be either 'rpc-literal' or 'document-wrapped'") + ->end() ->end() - ->end() - ->scalarNode('cache_type') - ->validate() - ->ifNotInArray($this->cacheTypes) - ->thenInvalid(sprintf('The cache type has to be either %s', implode(', ', $this->cacheTypes))) + ->scalarNode('cache_type') + ->validate() + ->ifNotInArray($this->cacheTypes) + ->thenInvalid(sprintf('The cache type has to be either %s', implode(', ', $this->cacheTypes))) + ->end() ->end() ->end() ->end() @@ -133,11 +130,12 @@ class Configuration ->children() ->arrayNode('wsdl_dumper') ->addDefaultsIfNotSet() - ->children() - ->scalarNode('stylesheet')->defaultNull() + ->children() + ->scalarNode('stylesheet')->defaultNull()->end() + ->end() ->end() ->end() ->end() ; } -} \ No newline at end of file +}