[SoapBundle] Fixed Configuration.php

This commit is contained in:
Francis Besset 2013-07-22 11:52:32 +02:00
parent 2e99bb7e17
commit e4a9b70fb3
1 changed files with 42 additions and 44 deletions

View File

@ -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()
;
}
}
}