public function parseResponse($data = '', $headersProcessed = false, $returnType = 'xmlrpcvals')
{
if ($this->debug) {
- Logger::debugMessage("---GOT---\n$data\n---END---");
+ Logger::instance()->debugMessage("---GOT---\n$data\n---END---");
}
$this->httpResponse = array('raw_data' => $data, 'headers' => array(), 'cookies' => array());
$start += strlen('<!-- SERVER DEBUG INFO (BASE64 ENCODED):');
$end = strpos($data, '-->', $start);
$comments = substr($data, $start, $end - $start);
- Logger::debugMessage("---SERVER DEBUG INFO (DECODED) ---\n\t" .
+ Logger::instance()->debugMessage("---SERVER DEBUG INFO (DECODED) ---\n\t" .
str_replace("\n", "\n\t", base64_decode($comments)) . "\n---END---", $respEncoding);
}
}
$r = new Response(0, PhpXmlRpc::$xmlrpcerr['invalid_return'],
PhpXmlRpc::$xmlrpcstr['invalid_return']);
} else {
- if ($this->debug) {
- Logger::debugMessage(
+ if ($this->debug > 1) {
+ Logger::instance()->debugMessage(
"---PARSED---\n".var_export($xmlRpcParser->_xh['value'], true)."\n---END---"
);
}
return $r;
}
+
+ /**
+ * Enables/disables the echoing to screen of the xmlrpc responses received.
+ *
+ * @param integer $in values 0, 1, 2 are supported
+ */
+ public function setDebug($in)
+ {
+ $this->debug = $in;
+ }
}