$out .= "<!-- SERVER DEBUG INFO (BASE64 ENCODED):\n" . base64_encode($this->debug_info) . "\n-->\n";
}
if (static::$_xmlrpc_debuginfo != '') {
- $out .= "<!-- DEBUG INFO:\n" . Charset::instance()->encode_entities(str_replace('--', '_-', static::$_xmlrpc_debuginfo), PhpXmlRpc::$xmlrpc_internalencoding, $charset_encoding) . "\n-->\n";
+ $out .= "<!-- DEBUG INFO:\n" . Charset::instance()->encodeEntities(str_replace('--', '_-', static::$_xmlrpc_debuginfo), PhpXmlRpc::$xmlrpc_internalencoding, $charset_encoding) . "\n-->\n";
// NB: a better solution MIGHT be to use CDATA, but we need to insert it
// into return payload AFTER the beginning tag
//$out .= "<![CDATA[ DEBUG INFO:\n\n" . str_replace(']]>', ']_]_>', static::$_xmlrpc_debuginfo) . "\n]]>\n";
public function service($data = null, $return_payload = false)
{
if ($data === null) {
- // workaround for a known bug in php ver. 5.2.2 that broke $HTTP_RAW_POST_DATA
$data = file_get_contents('php://input');
}
$raw_data = $data;
/**
* Verify type and number of parameters received against a list of known signatures.
*
- * @param array $in array of either xmlrpcval objects or xmlrpc type definitions
+ * @param array $in array of either xmlrpc value objects or xmlrpc type definitions
* @param array $sig array of known signatures to match against
*
* @return array
xml_parser_free($parser);
// small layering violation in favor of speed and memory usage:
// we should allow the 'execute' method handle this, but in the
- // most common scenario (xmlrpcvals type server with some methods
+ // most common scenario (xmlrpc values type server with some methods
// registered as phpvals) that would mean a useless encode+decode pass
if ($this->functions_parameters_type != 'xmlrpcvals' || (isset($this->dmap[$xmlRpcParser->_xh['method']]['parameters_type']) && ($this->dmap[$xmlRpcParser->_xh['method']]['parameters_type'] == 'phpvals'))) {
if ($this->debug > 1) {
}
}
- /**
- * A debugging routine: just echoes back the input packet as a string value
- * DEPRECATED!
- */
- public function echoInput()
- {
- $r = new Response(new Value("'Aha said I: '" . file_get_contents('php://input'), 'string'));
- print $r->serialize();
- }
-
/* Functions that implement system.XXX methods of xmlrpc servers */
public function getSystemDispatchMap()
public static function _xmlrpcs_methodSignature($server, $m)
{
- // let accept as parameter both an xmlrpcval or string
+ // let accept as parameter both an xmlrpc value or string
if (is_object($m)) {
$methName = $m->getParam(0);
$methName = $methName->scalarval();
public static function _xmlrpcs_methodHelp($server, $m)
{
- // let accept as parameter both an xmlrpcval or string
+ // let accept as parameter both an xmlrpc value or string
if (is_object($m)) {
$methName = $m->getParam(0);
$methName = $methName->scalarval();