|
|
@@ -89,6 +89,7 @@ class Zend_Soap_Client
|
|
|
protected $_features = null;
|
|
|
protected $_cache_wsdl = null;
|
|
|
protected $_user_agent = null;
|
|
|
+ protected $_exceptions = null;
|
|
|
|
|
|
/**
|
|
|
* WSDL used to access server
|
|
|
@@ -268,6 +269,9 @@ class Zend_Soap_Client
|
|
|
case 'user_agent':
|
|
|
$this->setUserAgent($value);
|
|
|
break;
|
|
|
+ case 'exceptions':
|
|
|
+ $this->setExceptions($value);
|
|
|
+ break;
|
|
|
|
|
|
// Not used now
|
|
|
// case 'connection_timeout':
|
|
|
@@ -315,13 +319,14 @@ class Zend_Soap_Client
|
|
|
$options['cache_wsdl'] = $this->getWsdlCache();
|
|
|
$options['features'] = $this->getSoapFeatures();
|
|
|
$options['user_agent'] = $this->getUserAgent();
|
|
|
+ $options['exceptions'] = $this->getExceptions();
|
|
|
|
|
|
foreach ($options as $key => $value) {
|
|
|
/*
|
|
|
* ugly hack as I don't know if checking for '=== null'
|
|
|
* breaks some other option
|
|
|
*/
|
|
|
- if (in_array($key, array('user_agent', 'cache_wsdl', 'compression'))) {
|
|
|
+ if (in_array($key, array('user_agent', 'cache_wsdl', 'compression', 'exceptions'))) {
|
|
|
if ($value === null) {
|
|
|
unset($options[$key]);
|
|
|
}
|
|
|
@@ -909,6 +914,39 @@ class Zend_Soap_Client
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
+ * Set the exceptions option
|
|
|
+ *
|
|
|
+ * The exceptions option is a boolean value defining whether soap errors
|
|
|
+ * throw exceptions.
|
|
|
+ *
|
|
|
+ * @see http://php.net/manual/soapclient.soapclient.php#refsect1-soapclient.soapclient-parameters
|
|
|
+ *
|
|
|
+ * @param bool $exceptions
|
|
|
+ * @return $this
|
|
|
+ */
|
|
|
+ public function setExceptions($exceptions)
|
|
|
+ {
|
|
|
+ $this->_exceptions = (bool) $exceptions;
|
|
|
+
|
|
|
+ return $this;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Get the exceptions option
|
|
|
+ *
|
|
|
+ * The exceptions option is a boolean value defining whether soap errors
|
|
|
+ * throw exceptions.
|
|
|
+ *
|
|
|
+ * @see http://php.net/manual/soapclient.soapclient.php#refsect1-soapclient.soapclient-parameters
|
|
|
+ *
|
|
|
+ * @return bool|null
|
|
|
+ */
|
|
|
+ public function getExceptions()
|
|
|
+ {
|
|
|
+ return $this->_exceptions;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
* Retrieve request XML
|
|
|
*
|
|
|
* @return string
|