[ Index ]

PHP Cross Reference of moodle-2.8

title

Body

[close]

/lib/zend/Zend/Soap/Client/ -> Common.php (source)

   1  <?php
   2  /**
   3   * Zend Framework
   4   *
   5   * LICENSE
   6   *
   7   * This source file is subject to the new BSD license that is bundled
   8   * with this package in the file LICENSE.txt.
   9   * It is also available through the world-wide-web at this URL:
  10   * http://framework.zend.com/license/new-bsd
  11   * If you did not receive a copy of the license and are unable to
  12   * obtain it through the world-wide-web, please send an email
  13   * to [email protected] so we can send you a copy immediately.
  14   *
  15   * @category   Zend
  16   * @package    Zend_Soap
  17   * @subpackage Client
  18   * @copyright  Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
  19   * @license    http://framework.zend.com/license/new-bsd     New BSD License
  20   * @version    $Id$
  21   */
  22  
  23  
  24  if (extension_loaded('soap')) {
  25  
  26  /**
  27   * @category   Zend
  28   * @package    Zend_Soap
  29   * @subpackage Client
  30   */
  31  class Zend_Soap_Client_Common extends SoapClient
  32  {
  33      /**
  34       * doRequest() pre-processing method
  35       *
  36       * @var callback
  37       */
  38      protected $_doRequestCallback;
  39  
  40      /**
  41       * Common Soap Client constructor
  42       *
  43       * @param callback $doRequestMethod
  44       * @param string $wsdl
  45       * @param array $options
  46       */
  47      function __construct($doRequestCallback, $wsdl, $options)
  48      {
  49          $this->_doRequestCallback = $doRequestCallback;
  50  
  51          parent::__construct($wsdl, $options);
  52      }
  53  
  54      /**
  55       * Performs SOAP request over HTTP.
  56       * Overridden to implement different transport layers, perform additional XML processing or other purpose.
  57       *
  58       * @param string $request
  59       * @param string $location
  60       * @param string $action
  61       * @param int    $version
  62       * @param int    $one_way
  63       * @return mixed
  64       */
  65      function __doRequest($request, $location, $action, $version, $one_way = null)
  66      {
  67          if ($one_way === null) {
  68              return call_user_func($this->_doRequestCallback, $this, $request, $location, $action, $version);
  69          } else {
  70              return call_user_func($this->_doRequestCallback, $this, $request, $location, $action, $version, $one_way);
  71          }
  72      }
  73  
  74  }
  75  
  76  } // end if (extension_loaded('soap')


Generated: Fri Nov 28 20:29:05 2014 Cross-referenced by PHPXref 0.7.1