Remote Procedure Calls with PEAR::XML-RPC - Map and Send
(Page 10 of 12 )
A distribution map is created to assign the function components to the correct request. It takes the form on an array indexed by the requested function's name; the value is another array which maps the appropriate internal function name, signature and documentation string using the keys "function," "signature" and "docstring."
<?php $map = array("getNameLength" => array("function" => "getnamelength", "signature" => $getnamelength_sig, "docstring" => $getnamelength_doc)); ?> |
The distribution map is then passed to XML_RPC_Server which handle the incoming request when the API is called.
<?php new XML_RPC_Server($map); ?> |
Next: The Output >>
More Miscellaneous Articles
More By bluephoenix