From 581ebaf8659b54af7bdeace5d9362ab1cc41ea42 Mon Sep 17 00:00:00 2001 From: Francis Besset Date: Thu, 14 Jul 2011 18:13:34 +0200 Subject: [PATCH] Fixed DIC --- DependencyInjection/WebServiceExtension.php | 9 ++++++--- Resources/config/webservice.xml | 9 ++++++--- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/DependencyInjection/WebServiceExtension.php b/DependencyInjection/WebServiceExtension.php index 8d6a34e..b67e07a 100644 --- a/DependencyInjection/WebServiceExtension.php +++ b/DependencyInjection/WebServiceExtension.php @@ -58,13 +58,16 @@ class WebServiceExtension extends Extension $contextPrototype = $container->getDefinition('webservice.context'); $contextPrototypeArguments = $contextPrototype->getArguments(); - $contextId = 'webservice.context.' . $config['name']; + $contextId = 'webservice.context.'.$config['name']; $context = $container->setDefinition($contextId, new DefinitionDecorator('webservice.context')); + $arguments = array(); foreach($bindingDependentArguments as $idx) { - $context->setArgument($idx, new Reference($contextPrototypeArguments[$idx] . $bindingSuffix)); + $arguments[] = new Reference($contextPrototypeArguments[$idx].$bindingSuffix); } - $context->setArgument(5, array_merge($contextPrototypeArguments[5], $config)); + $arguments[5] = array_merge($contextPrototypeArguments[5], $config); + + $context->setArguments($arguments); } public function getNamespace() diff --git a/Resources/config/webservice.xml b/Resources/config/webservice.xml index 6b93d64..7fcdd2f 100644 --- a/Resources/config/webservice.xml +++ b/Resources/config/webservice.xml @@ -54,11 +54,14 @@ - + - + - + + + + \ No newline at end of file