[SoapBundle] Fixed service definition with factory

This commit is contained in:
Francis Besset 2015-06-01 16:04:29 +02:00
parent 2974a4f838
commit 855e382590
2 changed files with 7 additions and 2 deletions

View File

@ -147,7 +147,10 @@ class BeSimpleSoapExtension extends Extension
$definition = new DefinitionDecorator('besimple.soap.client');
$container->setDefinition(sprintf('besimple.soap.client.%s', $client), $definition);
$definition->setFactoryService(sprintf('besimple.soap.client.builder.%s', $client));
$definition->setFactory(array(
new Reference(sprintf('besimple.soap.client.builder.%s', $client)),
'build'
));
}
private function createWebServiceContext(array $config, ContainerBuilder $container)

View File

@ -19,7 +19,9 @@
<argument type="service" id="besimple.soap.cache" /> <!-- hack to load besimple cache configuration -->
</service>
<service id="besimple.soap.client" factory-service="besimple.soap.client.builder" factory-method="build" class="%besimple.soap.client.builder.class%" abstract="true" />
<service id="besimple.soap.client" class="%besimple.soap.client.builder.class%" abstract="true">
<factory class="besimple.soap.client.builder" method="build" />
</service>
<service id="besimple.soap.classmap" class="%besimple.soap.classmap.class%" abstract="true" />
</services>