What you pass to the constructor is an asociative array of asociative arrays. The array have as keys the name
of the methods to implement, each method has as key an array indicating with key "function" the name of a
function to call for the method. In the example the procedure "examples.myFunc" calls function "foo", foo
will be called a method handler for this reason.
Writing method handlers.
A method handler is easy this is a skeleton:
function foo ($params)
global $xmlrpcerruser; // import user errcode value
// $params is an Array of xmlrpcval objects
// this is an error condition
return new xmlrpcresp(0, $xmlrpcerruser+1, // user error 1
"There's a problem, Captain");
// this is a successful value being returned
return new xmlrpcresp(new xmlrpcval("All's fine!", "string"));
As you can see you just check for errors and return an error (starting from $xmlrpcerruser+1) or a xmlrpcresp
if everything went ok, all the rest of the wor is done by the class.