Created a client classmap even when it is empty
This commit is contained in:
parent
59ea6b1ce0
commit
e4cb612aed
|
@ -104,12 +104,8 @@ class BeSimpleSoapExtension extends Extension
|
||||||
|
|
||||||
$definition->replaceArgument(1, $defOptions);
|
$definition->replaceArgument(1, $defOptions);
|
||||||
|
|
||||||
if (!empty($options['classmap'])) {
|
|
||||||
$classmap = $this->createClientClassmap($client, $options['classmap'], $container);
|
$classmap = $this->createClientClassmap($client, $options['classmap'], $container);
|
||||||
$definition->replaceArgument(2, new Reference($classmap));
|
$definition->replaceArgument(2, new Reference($classmap));
|
||||||
} else {
|
|
||||||
$definition->replaceArgument(2, null);
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->createClient($client, $container);
|
$this->createClient($client, $container);
|
||||||
}
|
}
|
||||||
|
@ -120,9 +116,11 @@ class BeSimpleSoapExtension extends Extension
|
||||||
$definition = new DefinitionDecorator('besimple.soap.classmap');
|
$definition = new DefinitionDecorator('besimple.soap.classmap');
|
||||||
$container->setDefinition(sprintf('besimple.soap.classmap.%s', $client), $definition);
|
$container->setDefinition(sprintf('besimple.soap.classmap.%s', $client), $definition);
|
||||||
|
|
||||||
|
if (!empty($classmap)) {
|
||||||
$definition->setMethodCalls(array(
|
$definition->setMethodCalls(array(
|
||||||
array('set', array($classmap)),
|
array('set', array($classmap)),
|
||||||
));
|
));
|
||||||
|
}
|
||||||
|
|
||||||
return sprintf('besimple.soap.classmap.%s', $client);
|
return sprintf('besimple.soap.classmap.%s', $client);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue