Used BeSimple\SoapCommon\Cache to define the cache strategy

This commit is contained in:
Francis Besset
2011-09-04 00:36:24 +02:00
parent fd162d8ca6
commit aaca80a262
5 changed files with 65 additions and 6 deletions

View File

@ -12,6 +12,8 @@
namespace BeSimple\SoapClient\Soap;
use BeSimple\SoapCommon\Cache;
/**
* @author Francis Besset <francis.besset@gmail.com>
*/
@ -33,8 +35,8 @@ class SoapClient
public function setOptions(array $options)
{
$this->options = array(
'cache_dir' => null,
'debug' => false,
'debug' => false,
'cache_wsdl' => null,
);
// check option names and live merge, if errors are encountered Exception will be thrown
@ -135,7 +137,11 @@ class SoapClient
{
$options = array();
$options['cache_wsdl'] = $this->options['debug'] ? WSDL_CACHE_NONE : WSDL_CACHE_DISK;
if (null === $this->options['cache_wsdl']) {
$this->options['cache_wsdl'] = Cache::getType();
}
$options['cache_wsdl'] = $this->options['cache_wsdl'];
$options['trace'] = $this->options['debug'];
return $options;