Deleted "name" element in the configuration of services
This commit is contained in:
parent
581ebaf865
commit
81118f8d47
|
@ -33,11 +33,9 @@ class Configuration
|
|||
$rootNode
|
||||
->children()
|
||||
->arrayNode('services')
|
||||
->useAttributeAsKey('name')
|
||||
->prototype('array')
|
||||
->children()
|
||||
->scalarNode('name')
|
||||
->isRequired()
|
||||
->end()
|
||||
->scalarNode('namespace')
|
||||
->isRequired()
|
||||
->end()
|
||||
|
|
|
@ -44,12 +44,12 @@ class WebServiceExtension extends Extension
|
|||
|
||||
$config = $processor->process($configuration->getConfigTree(), $configs);
|
||||
|
||||
foreach($config['services'] as $serviceContextConfig) {
|
||||
$this->createWebServiceContext($serviceContextConfig, $container);
|
||||
foreach($config['services'] as $name => $serviceConfig) {
|
||||
$this->createWebServiceContext($name, $serviceConfig, $container);
|
||||
}
|
||||
}
|
||||
|
||||
private function createWebServiceContext(array $config, ContainerBuilder $container)
|
||||
private function createWebServiceContext($name, array $config, ContainerBuilder $container)
|
||||
{
|
||||
$bindingDependentArguments = array(1, 3, 4);
|
||||
$bindingSuffix = $this->bindingConfigToServiceSuffixMap[$config['binding']];
|
||||
|
@ -58,7 +58,7 @@ class WebServiceExtension extends Extension
|
|||
$contextPrototype = $container->getDefinition('webservice.context');
|
||||
$contextPrototypeArguments = $contextPrototype->getArguments();
|
||||
|
||||
$contextId = 'webservice.context.'.$config['name'];
|
||||
$contextId = 'webservice.context.'.$name;
|
||||
$context = $container->setDefinition($contextId, new DefinitionDecorator('webservice.context'));
|
||||
|
||||
$arguments = array();
|
||||
|
|
|
@ -26,8 +26,7 @@ QuickStart
|
|||
|
||||
web_service:
|
||||
services:
|
||||
demoapi:
|
||||
name: DemoApi
|
||||
DemoApi:
|
||||
namespace: http://mysymfonyapp.com/ws/DemoApi/1.0/
|
||||
binding: rpc-literal
|
||||
resource: "@AcmeDemoBundle/Controller/DemoController.php"
|
||||
|
|
Loading…
Reference in New Issue