File indexing completed on 2025-03-02 05:29:51
0001 <?php 0002 /** 0003 * Zend Framework 0004 * 0005 * LICENSE 0006 * 0007 * This source file is subject to the new BSD license that is bundled 0008 * with this package in the file LICENSE.txt. 0009 * It is also available through the world-wide-web at this URL: 0010 * http://framework.zend.com/license/new-bsd 0011 * If you did not receive a copy of the license and are unable to 0012 * obtain it through the world-wide-web, please send an email 0013 * to license@zend.com so we can send you a copy immediately. 0014 * 0015 * @category Zend 0016 * @package Zend_Soap 0017 * @subpackage Client 0018 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) 0019 * @license http://framework.zend.com/license/new-bsd New BSD License 0020 * @version $Id$ 0021 */ 0022 0023 0024 if (extension_loaded('soap')) { 0025 0026 /** 0027 * @category Zend 0028 * @package Zend_Soap 0029 * @subpackage Client 0030 */ 0031 class Zend_Soap_Client_Common extends SoapClient 0032 { 0033 /** 0034 * doRequest() pre-processing method 0035 * 0036 * @var callback 0037 */ 0038 protected $_doRequestCallback; 0039 0040 /** 0041 * Common Soap Client constructor 0042 * 0043 * @param callback $doRequestMethod 0044 * @param string $wsdl 0045 * @param array $options 0046 */ 0047 function __construct($doRequestCallback, $wsdl, $options) 0048 { 0049 $this->_doRequestCallback = $doRequestCallback; 0050 0051 parent::__construct($wsdl, $options); 0052 } 0053 0054 /** 0055 * Performs SOAP request over HTTP. 0056 * Overridden to implement different transport layers, perform additional XML processing or other purpose. 0057 * 0058 * @param string $request 0059 * @param string $location 0060 * @param string $action 0061 * @param int $version 0062 * @param int $one_way 0063 * @return mixed 0064 */ 0065 function __doRequest($request, $location, $action, $version, $one_way = null) 0066 { 0067 if ($one_way === null) { 0068 return call_user_func($this->_doRequestCallback, $this, $request, $location, $action, $version); 0069 } else { 0070 return call_user_func($this->_doRequestCallback, $this, $request, $location, $action, $version, $one_way); 0071 } 0072 } 0073 0074 } 0075 0076 } // end if (extension_loaded('soap')