- md5
- b0819ee511ed7b5ab2963e4847dcd86a
- sha1
- f42f937f60f9775b2d021368949c5954eed39cd9
- sha256
- a27f6f7406ece90ddcd2630563330c23cf77cff277b1dffbcea76ad06e4b64e5
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
<?php
/**
* dom_xmlrpc_array_document wraps a PHP array with the DOM XML-RPC API
* @package dom-xmlrpc
* @copyright (C) 2004 John Heinstein. All rights reserved
* @license http://www.gnu.org/copyleft/lesser.html LGPL License
* @author John Heinstein <[email protected]>
* @link http://www.engageinteractive.com/dom_xmlrpc/ DOM XML-RPC Home Page
* DOM XML-RPC is Free Software
**/
if (!defined('DOM_XMLRPC_INCLUDE_PATH')) {
define('DOM_XMLRPC_INCLUDE_PATH', (dirname(__FILE__) . "/"));
}
require_once(DOM_XMLRPC_INCLUDE_PATH . 'dom_xmlrpc_constants.php');
/**
* An array of XML-RPC data wrapped in the DOM XML-RPC API
*
* @package dom-xmlrpc
* @author John Heinstein <[email protected]>
*/
class dom_xmlrpc_array_document {
/** @var string The type of method - response or fault */
var $methodType;
/** @var string The name of the requested method */
var $methodName = "";
/** @var string An array containing the method response params */
var $params = array();
/** @var int The fault code, if one exists */
var $faultCode = null;
/** @var string A description of the fault code, if one exists */
var $faultString = null;
/**
* dom_xmlrpc_array_document constructor
*/
function dom_xmlrpc_array_document() {
//do nothing
} //dom_xmlrpc_array_document
/**
* Returns the method type
* @return string The method type
*/
function getMethodType() {
return $this->methodType;
} //getMethodType
/**
* Returns the method name
* @return string The method name
*/
function getMethodName() {
return $this->methodName;
//if name is "", will be picked up by methodNotFoundHandler
} //getMethodName
/**
* Returns a reference to the params array
* @return array A reference to the params array
*/
function &getParams() {
return $this->params;
} //getParams
/**
* Returns a reference to the specified param
* @param int The param index in the params array
* @return mixed A reference to the param
*/
function &getParam($index) {
return $this->params[$index];
} //getParam
/**
* Returns the number of params in the params array
* @return int The number of params in the params array
*/
function getParamCount() {
return count($this->params);
} //getParamCount
/**
* Determines whether the method response is a fault
* @return boolean True if the method response is a fault
*/
function isFault() {
return ($this->methodType == DOM_XMLRPC_TYPE_FAULT);
} //isFault
/**
* Returns the current fault code
* @return int The current fault code
*/
function getFaultCode() {
return $this->faultCode;
} //getFaultCode
/**
* Returns the current fault string
* @return string The current fault string
*/
function getFaultString() {
return $this->faultString;
} //getFaultString
/**
* Returns the type of the specified param
* @param mixed The param to be tested
* @return string The type of the specified param
*/
function getParamType($param) {
require_once(DOM_XMLRPC_INCLUDE_PATH . 'dom_xmlrpc_utilities.php');
return (dom_xmlrpc_utilities::getTypeFromValue($param));
} //getParamType
/**
* Returns a string representation of the parameters array
* @return string A string representation of the parameters array
*/
function toString() {
ob_start();
print_r($this->params);
$ob_contents = ob_get_contents();
ob_end_clean();
return $ob_contents;
} //toString
/**
* Returns a formatted string representation of the parameters array
* @return string A formatted string representation of the parameters array
*/
function toNormalizedString() {
return $this->toString();
} //toNormalizedString
} //dom_xmlrpc_array_document
?>
The same content is in 11 releases, Joomla 1.0.3 to 1.0.15. See them all, or every version of this file.