Source for file jXmlRpcRequest.class.php

Documentation is available at jXmlRpcRequest.class.php

  1. <?php
  2. /**
  3. @package     jelix
  4. @subpackage  core_request
  5. @author      Laurent Jouanneau
  6. @contributor Frederic Guillot
  7. @contributor Thibault Piront (nuKs)
  8. @copyright   2005-2011 Laurent Jouanneau, 2007 Frederic Guillot
  9. @copyright   2007 Thibault Piront
  10. @link        http://www.jelix.org
  11. @licence     GNU Lesser General Public Licence see LICENCE file or http://www.gnu.org/licenses/lgpl.html
  12. */
  13.  
  14. /**
  15. *
  16. */
  17. require(JELIX_LIB_UTILS_PATH'jXmlRpc.class.php');
  18.  
  19. /**
  20. * handle XML-rpc call. The response has to be a xml-rpc response.
  21. @package  jelix
  22. @subpackage core_request
  23. @link http://www.xmlrpc.com/
  24. */
  25. class jXmlRpcRequest extends jRequest {
  26.  
  27.     public $type = 'xmlrpc';
  28.  
  29.     public $defaultResponseType = 'xmlrpc';
  30.  
  31.     public $authorizedResponseClass = 'jResponseXmlrpc';
  32.  
  33.     /**
  34.      * Analyze the HTTP request and set the params property
  35.      */
  36.     protected function _initParams(){
  37.         global $HTTP_RAW_POST_DATA;
  38.         if(isset($HTTP_RAW_POST_DATA)){
  39.             $requestXml $HTTP_RAW_POST_DATA;
  40.         }else{
  41.             $requestXml file('php://input');
  42.             $requestXml implode("\n",$requestXml);
  43.         }
  44.  
  45.         // Decode the request
  46.         list($nom,$varsjXmlRpc::decodeRequest($requestXml);
  47.         list($module$actionexplode(':',$nom,2);
  48.  
  49.         if(count($vars== && is_array($vars[0]))
  50.             $this->params = $vars[0];
  51.  
  52.         $this->params['params'$vars;
  53.  
  54.         // Definition of action to use and its parameters
  55.         $this->params['module'$module;
  56.         $this->params['action'$action;
  57.     }
  58. }

Documentation generated on Wed, 04 Jan 2017 22:57:21 +0100 by phpDocumentor 1.4.3