3 * Zend Framework (http://framework.zend.com/)
5 * @link http://github.com/zendframework/zf2 for the canonical source repository
6 * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
7 * @license http://framework.zend.com/license/new-bsd New BSD License
10 namespace Zend\Soap\Client
;
14 if (extension_loaded('soap')) {
16 class Common
extends SoapClient
19 * doRequest() pre-processing method
23 protected $doRequestCallback;
26 * Common Soap Client constructor
28 * @param callable $doRequestCallback
30 * @param array $options
32 public function __construct($doRequestCallback, $wsdl, $options)
34 $this->doRequestCallback
= $doRequestCallback;
35 parent
::__construct($wsdl, $options);
39 * Performs SOAP request over HTTP.
40 * Overridden to implement different transport layers, perform additional
41 * XML processing or other purpose.
43 * @param string $request
44 * @param string $location
45 * @param string $action
50 public function __doRequest($request, $location, $action, $version, $oneWay = null)
52 // ltrim is a workaround for https://bugs.php.net/bug.php?id=63780
53 if ($oneWay === null) {
54 return call_user_func($this->doRequestCallback
, $this, ltrim($request), $location, $action, $version);
57 return call_user_func($this->doRequestCallback
, $this, ltrim($request), $location, $action, $version, $oneWay);
61 } // end if (extension_loaded('soap')