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 / Local.php
blob6c6342065c37395aa2fdc8ea9bb604f2266d8688
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 Zend\Soap\Client as SOAPClient;
13 use Zend\Soap\Server as SOAPServer;
15 /**
16 * Class is intended to be used as local SOAP client which works
17 * with a provided Server object.
19 * Could be used for development or testing purposes.
21 class Local extends SOAPClient
23 /**
24 * Server object
25 * @var SOAPServer
27 protected $server;
29 /**
30 * Local client constructor
32 * @param SOAPServer $server
33 * @param string $wsdl
34 * @param array $options
36 public function __construct(SOAPServer $server, $wsdl, $options = null)
38 $this->server = $server;
40 // Use Server specified SOAP version as default
41 $this->setSoapVersion($server->getSoapVersion());
43 parent::__construct($wsdl, $options);
46 /**
47 * Actual "do request" method.
49 * @param Common $client
50 * @param string $request
51 * @param string $location
52 * @param string $action
53 * @param int $version
54 * @param int $oneWay
55 * @return mixed
57 public function _doRequest(Common $client, $request, $location, $action, $version, $oneWay = null)
59 // Perform request as is
60 ob_start();
61 $this->server->handle($request);
62 $response = ob_get_clean();
64 if ($response === null || $response === '') {
65 $serverResponse = $this->server->getResponse();
66 if ($serverResponse !== null) {
67 $response = $serverResponse;
71 return $response;