Added user_agent option
This commit is contained in:
parent
1d9bd2cdd3
commit
6d2e9d7634
|
@ -84,18 +84,21 @@ class BeSimpleSoapExtension extends Extension
|
|||
|
||||
$definition->replaceArgument(0, $options['wsdl']);
|
||||
|
||||
if (isset($options['cache_type'])) {
|
||||
$options['cache_type'] = $this->getCacheType($options['cache_type']);
|
||||
|
||||
$defOptions = $container
|
||||
->getDefinition('besimple.soap.client')
|
||||
->getArgument(1);
|
||||
|
||||
$defOptions['cache_type'] = $options['cache_type'];
|
||||
$defOptions['namespace'] = $options['namespace'];
|
||||
foreach (array('cache_type', 'namespace', 'user_agent') as $key) {
|
||||
if (isset($options[$key])) {
|
||||
$defOptions[$key] = $options[$key];
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($defOptions['cache_type'])) {
|
||||
$$defOptions['cache_type'] = $this->getCacheType($defOptions['cache_type']);
|
||||
}
|
||||
|
||||
$definition->replaceArgument(1, $defOptions);
|
||||
}
|
||||
|
||||
if (!empty($options['classmap'])) {
|
||||
$classmap = $this->createClientClassmap($client, $options['classmap'], $container);
|
||||
|
|
|
@ -74,7 +74,8 @@ class Configuration
|
|||
->prototype('array')
|
||||
->children()
|
||||
->scalarNode('wsdl')->isRequired()->end()
|
||||
->scalarNode('namespace')->defaultNull()->end()
|
||||
->scalarNode('namespace')->end()
|
||||
->scalarNode('user_agent')->end()
|
||||
->scalarNode('cache_type')
|
||||
->validate()
|
||||
->ifNotInArray($this->cacheTypes)
|
||||
|
|
|
@ -13,8 +13,6 @@
|
|||
<argument /> <!-- wsdl URI -->
|
||||
<argument type="collection">
|
||||
<argument key="debug">%kernel.debug%</argument>
|
||||
<argument key="cache_type">null</argument>
|
||||
<argument key="namespace">null</argument>
|
||||
</argument>
|
||||
<argument type="service" id="besimple.soap.classmap" />
|
||||
<argument type="service" id="besimple.soap.converter.collection" />
|
||||
|
|
Loading…
Reference in New Issue