<commit_before><?php

require_once 'Site/pages/SitePage.php';
require_once 'Site/layouts/SiteXMLRPCServerLayout.php';
require_once 'XML/RPC2/Server.php';

/**
 * Base class for an XML-RPC Server
 *
 * The XML-RPC server acts as a regular page in an application. This means
 * all the regular page security features work for XML-RPC servers.
 *
 * Site XML-RPC server pages use the PEAR::XML_RPC2 package to service
 * requests.
 *
 * @package   Site
 * @copyright 2005-2006 silverorange
 * @license   http://www.gnu.org/copyleft/lesser.html LGPL License 2.1
 */
abstract class SiteXMLRPCServer extends SitePage
{
	// {{{ public function process()

	/**
	 * Process the request
	 *
	 * This method is called by site code to process the page request. It creates 
	 * an XML-RPC server and handles a request. The XML-RPC response from the
	 * server is output here as well.
	 *
	 * @xmlrpc.hidden
	 */
	public function process()
	{
		$server = XML_RPC2_Server::create($this, array('encoding' => 'UTF-8'));

		$this->layout->startCapture('response');
		$server->handleCall();
		$this->layout->endCapture();
	}

	// }}}
	// {{{ public function build()

	/**
	 * @xmlrpc.hidden
	 */
	public function build()
	{
	}

	// }}}
	// {{{ protected function createLayout()

	/**
	 * @xmlrpc.hidden
	 */
	protected function createLayout()
	{
		return new SiteXMLRPCServerLayout($this->app);
	}

	// }}}
}

?><commit_msg>Hide finalize and toString methods of XML-RPC server.<commit_after><?php

require_once 'Site/pages/SitePage.php';
require_once 'Site/layouts/SiteXMLRPCServerLayout.php';
require_once 'XML/RPC2/Server.php';

/**
 * Base class for an XML-RPC Server
 *
 * The XML-RPC server acts as a regular page in an application. This means
 * all the regular page security features work for XML-RPC servers.
 *
 * Site XML-RPC server pages use the PEAR::XML_RPC2 package to service
 * requests.
 *
 * @package   Site
 * @copyright 2005-2006 silverorange
 * @license   http://www.gnu.org/copyleft/lesser.html LGPL License 2.1
 */
abstract class SiteXMLRPCServer extends SitePage
{
	// {{{ public function process()

	/**
	 * Process the request
	 *
	 * This method is called by site code to process the page request. It creates 
	 * an XML-RPC server and handles a request. The XML-RPC response from the
	 * server is output here as well.
	 *
	 * @xmlrpc.hidden
	 */
	public function process()
	{
		$server = XML_RPC2_Server::create($this, array('encoding' => 'UTF-8'));

		$this->layout->startCapture('response');
		$server->handleCall();
		$this->layout->endCapture();
	}

	// }}}
	// {{{ public function build()

	/**
	 * @xmlrpc.hidden
	 */
	public function build()
	{
	}

	// }}}
	// {{{ public function finalize()

	/**
	 * @xmlrpc.hidden
	 */
	public function finalize()
	{
		parent::finalize();
	}

	// }}}
	// {{{ public function __toString()

	/**
	 * @xmlrpc.hidden
	 */
	public function __toString()
	{
		parent::__toString();
	}

	// }}}
	// {{{ protected function createLayout()

	/**
	 * @xmlrpc.hidden
	 */
	protected function createLayout()
	{
		return new SiteXMLRPCServerLayout($this->app);
	}

	// }}}
}

?>
{'fraction_non_alphanumeric': 0.14505776636713735, 'fraction_numerical': 0.008985879332477536, 'mean_word_length': 3.3291666666666666, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 8}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6935935', 'n_tokens_mistral': 1049, 'n_tokens_neox': 971, 'n_words': 279}