Added the zend framework 2 library, the path is specified in line no.26 in zend_modul...
[openemr.git] / interface / modules / zend_modules / library / Zend / Soap / Client / Common.php
blobbf9eb5c8841f191ca37eab32f672df5d0eab79cf
1 <?php
2 /**
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
8 */
10 namespace Zend\Soap\Client;
12 use SoapClient;
14 if (extension_loaded('soap')) {
16 class Common extends SoapClient
18 /**
19 * doRequest() pre-processing method
21 * @var callable
23 protected $doRequestCallback;
25 /**
26 * Common Soap Client constructor
28 * @param callable $doRequestCallback
29 * @param string $wsdl
30 * @param array $options
32 public function __construct($doRequestCallback, $wsdl, $options)
34 $this->doRequestCallback = $doRequestCallback;
35 parent::__construct($wsdl, $options);
38 /**
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
46 * @param int $version
47 * @param int $oneWay
48 * @return mixed
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')