Skip to content

Commit 9b2986e

Browse files
Added param to change WSDL cache mode.
1 parent 1c79356 commit 9b2986e

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

Mplusqapiclient.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,10 @@ class MplusQAPIclient
7373
* @var
7474
*/
7575
private $connection_timeout = 30;
76+
/**
77+
* @var
78+
*/
79+
private $cache_wsdl = WSDL_CACHE_DISK;
7680
/**
7781
* @var
7882
*/
@@ -139,6 +143,9 @@ public function __construct($params=null)
139143
if (isset($params['skipQuickAvailabilityCheck'])) {
140144
$this->skipQuickAvailabilityCheck((bool)$params['skipQuickAvailabilityCheck']);
141145
}
146+
if (isset($params['cache_wsdl']) and in_array($params['cache_wsdl'],[WSDL_CACHE_NONE,WSDL_CACHE_DISK,WSDL_CACHE_MEMORY,WSDL_CACHE_BOTH])) {
147+
$this->cache_wsdl = $params['cache_wsdl'];
148+
}
142149
if (isset($params['apiServer']) and isset($params['apiPort']) and isset($params['apiIdent']) and isset($params['apiSecret'])) {
143150
$this->initClient();
144151
}
@@ -390,7 +397,7 @@ public function initClient()
390397
'trace' => $this->debug,
391398
'exceptions' => true,
392399
'features' => SOAP_SINGLE_ELEMENT_ARRAYS,
393-
'cache_wsdl' => WSDL_CACHE_DISK,
400+
'cache_wsdl' => $this->cache_wsdl,
394401
'connection_timeout' => $this->connection_timeout,
395402
];
396403
ini_set('soap.wsdl_cache_ttl', MplusQAPIclient::WSDL_TTL);

0 commit comments

Comments
 (0)