13 * to license@zend.com so we can send you a copy immediately. |
13 * to license@zend.com so we can send you a copy immediately. |
14 * |
14 * |
15 * @category Zend |
15 * @category Zend |
16 * @package Zend_Soap |
16 * @package Zend_Soap |
17 * @subpackage Client |
17 * @subpackage Client |
18 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) |
18 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) |
19 * @license http://framework.zend.com/license/new-bsd New BSD License |
19 * @license http://framework.zend.com/license/new-bsd New BSD License |
20 * @version $Id: Client.php 24593 2012-01-05 20:35:02Z matthew $ |
20 * @version $Id$ |
21 */ |
21 */ |
22 |
22 |
23 /** |
23 /** |
24 * @see Zend_Soap_Server |
24 * @see Zend_Soap_Server |
25 */ |
25 */ |
87 protected $_connection_timeout = null; |
87 protected $_connection_timeout = null; |
88 protected $_stream_context = null; |
88 protected $_stream_context = null; |
89 protected $_features = null; |
89 protected $_features = null; |
90 protected $_cache_wsdl = null; |
90 protected $_cache_wsdl = null; |
91 protected $_user_agent = null; |
91 protected $_user_agent = null; |
|
92 protected $_exceptions = null; |
92 |
93 |
93 /** |
94 /** |
94 * WSDL used to access server |
95 * WSDL used to access server |
95 * It also defines Zend_Soap_Client working mode (WSDL vs non-WSDL) |
96 * It also defines Zend_Soap_Client working mode (WSDL vs non-WSDL) |
96 * |
97 * |
313 //$options['connection_timeout'] = $this->_connection_timeout; |
317 //$options['connection_timeout'] = $this->_connection_timeout; |
314 $options['stream_context'] = $this->getStreamContext(); |
318 $options['stream_context'] = $this->getStreamContext(); |
315 $options['cache_wsdl'] = $this->getWsdlCache(); |
319 $options['cache_wsdl'] = $this->getWsdlCache(); |
316 $options['features'] = $this->getSoapFeatures(); |
320 $options['features'] = $this->getSoapFeatures(); |
317 $options['user_agent'] = $this->getUserAgent(); |
321 $options['user_agent'] = $this->getUserAgent(); |
|
322 $options['exceptions'] = $this->getExceptions(); |
318 |
323 |
319 foreach ($options as $key => $value) { |
324 foreach ($options as $key => $value) { |
320 /* |
325 /* |
321 * ugly hack as I don't know if checking for '=== null' |
326 * ugly hack as I don't know if checking for '=== null' |
322 * breaks some other option |
327 * breaks some other option |
323 */ |
328 */ |
324 if (in_array($key, array('user_agent', 'cache_wsdl', 'compression'))) { |
329 if (in_array($key, array('user_agent', 'cache_wsdl', 'compression', 'exceptions'))) { |
325 if ($value === null) { |
330 if ($value === null) { |
326 unset($options[$key]); |
331 unset($options[$key]); |
327 } |
332 } |
328 } else { |
333 } else { |
329 if ($value == null) { |
334 if ($value == null) { |
904 * @return string|null |
909 * @return string|null |
905 */ |
910 */ |
906 public function getUserAgent() |
911 public function getUserAgent() |
907 { |
912 { |
908 return $this->_user_agent; |
913 return $this->_user_agent; |
|
914 } |
|
915 |
|
916 /** |
|
917 * Set the exceptions option |
|
918 * |
|
919 * The exceptions option is a boolean value defining whether soap errors |
|
920 * throw exceptions. |
|
921 * |
|
922 * @see http://php.net/manual/soapclient.soapclient.php#refsect1-soapclient.soapclient-parameters |
|
923 * |
|
924 * @param bool $exceptions |
|
925 * @return $this |
|
926 */ |
|
927 public function setExceptions($exceptions) |
|
928 { |
|
929 $this->_exceptions = (bool) $exceptions; |
|
930 |
|
931 return $this; |
|
932 } |
|
933 |
|
934 /** |
|
935 * Get the exceptions option |
|
936 * |
|
937 * The exceptions option is a boolean value defining whether soap errors |
|
938 * throw exceptions. |
|
939 * |
|
940 * @see http://php.net/manual/soapclient.soapclient.php#refsect1-soapclient.soapclient-parameters |
|
941 * |
|
942 * @return bool|null |
|
943 */ |
|
944 public function getExceptions() |
|
945 { |
|
946 return $this->_exceptions; |
909 } |
947 } |
910 |
948 |
911 /** |
949 /** |
912 * Retrieve request XML |
950 * Retrieve request XML |
913 * |
951 * |