X-Git-Url: http://git.onelab.eu/?p=plcapi.git;a=blobdiff_plain;f=src%2FRequest.php;h=7d5a8a0cff5c90d8a571aa948fdb6b8c6c29e192;hp=8b367f14299b994c0652a59b6cbcc891f37dba70;hb=a3b1d45eb2e1fd0712d574a423c6c4af8d512ee1;hpb=6899594826eeabef7fa3ed8e5b0091cf05497ae4 diff --git a/src/Request.php b/src/Request.php index 8b367f1..7d5a8a0 100644 --- a/src/Request.php +++ b/src/Request.php @@ -317,7 +317,7 @@ class Request $r = new Response(0, PhpXmlRpc::$xmlrpcerr['invalid_return'], PhpXmlRpc::$xmlrpcstr['invalid_return']); } else { - if ($this->debug) { + if ($this->debug > 1) { Logger::instance()->debugMessage( "---PARSED---\n".var_export($xmlRpcParser->_xh['value'], true)."\n---END---" ); @@ -355,4 +355,14 @@ class Request 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; + } }