add test for debug messages set into the server by client code
[plcapi.git] / demo / server / server.php
index 180a108..f05557a 100644 (file)
@@ -37,6 +37,8 @@ class xmlrpcServerMethodsContainer
 {
     /**
      * Method used to test logging of php warnings generated by user functions.
+     * @param PhpXmlRpc\Request $req
+     * @return PhpXmlRpc\Response
      */
     public function phpWarningGenerator($req)
     {
@@ -46,12 +48,22 @@ class xmlrpcServerMethodsContainer
 
     /**
      * Method used to test catching of exceptions in the server.
+     * @param PhpXmlRpc\Request $req
+     * @throws Exception
      */
     public function exceptionGenerator($req)
     {
         throw new Exception("it's just a test", 1);
     }
 
+    /**
+     * @param string $msg
+     */
+    public function debugMessageGenerator($msg)
+    {
+        PhpXmlRpc\Server::xmlrpc_debugmsg($msg);
+    }
+
     /**
      * A PHP version of the state-number server. Send me an integer and i'll sell you a state.
      * Used to test wrapping of PHP methods into xmlrpc methods.