Fixed DIC

This commit is contained in:
Francis Besset
2011-07-14 18:13:34 +02:00
parent 51d1d28830
commit 581ebaf865
2 changed files with 12 additions and 6 deletions

View File

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