CoreFiles by mySites.guru
dom_xmlrpc_methodresponse.php66 lines, 1,703 bytes, from Joomla_1.0.13-Stable-Full_Package.zip
Raw History Compare with 1.0.12
md5
281ccdc873577910976ad9f1a3215c3d
sha1
738ee46189ed1b136e01521421dd62aa5feadbfa
sha256
bfcdc8e190e2047f3ecd97218566fd7a2d50c2ab23d31e7dc5265d9acf0d4f95
<?php
/**
* dom_xmlrpc_methodresponse is a representation of a XML-RPC method response
* @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_builder.php');

/**
* A representation of an XML-RPC method response
*
* @package dom-xmlrpc
* @author John Heinstein <[email protected]>
*/
class dom_xmlrpc_methodresponse extends dom_xmlrpc_builder {

	/**
	* Constructor: Instantiates a new method response
	* @param mixed The method response
	*/
	function dom_xmlrpc_methodresponse($response = null) {
		require_once(DOM_XMLRPC_INCLUDE_PATH . 'dom_xmlrpc_constants.php');
		require_once(DOM_XMLRPC_INCLUDE_PATH . 'dom_xmlrpc_utilities.php');

		$this->methodType = DOM_XMLRPC_TYPE_METHODRESPONSE;

		if ($response != null) {
			$this->add($response);
		}
	} //dom_xmlrpc_methodresponse

	/**
	* Returns a string representation of the method response
	* @return string A string representation of the method response
	*/
	function toString() {
		 $data = <<<METHODRESPONSE
<?xml version='1.0'?>
<methodResponse>
	<params>$this->params
	</params>
</methodResponse>
METHODRESPONSE;

		return $data;
	} //toString

	/**
	* Alias of toString
	* @return string A string representation of the method response
	*/
	function toXML() {
		return $this->toString();
	} //toXML
} //dom_xmlrpc_methodresponse

?>

The same content is in 11 releases, Joomla 1.0.3 to 1.0.15. See them all, or every version of this file.