Description :
Parameters :
Type | Name | Documentation |
array | something | A description |
string | another_thing | A description of another thing |
boolean | credentials | Whether to return nothing - server doesn't care though |
(return to index)
* /**
* * echoecho echoes the message received
* *
* * @param string Message
* * @return string The echo
* {@*}
* class EchoServer {
* public static function echoecho($string)
* {
* return $string;
* }
* }
*
* require_once 'XML/RPC2/Server.php';
* $server = XML_RPC2_Server::create('EchoServer');
* $server->handleCall();
*
*
* Use this call handler if you have designed your xml-rpc external interface as a set of
* public class methods on a given class. If, on the other hand, you intend to export an
* already existing class, it may be that not all of the methods you want to export are static.
* In that case, it is probably best to use XML_RPC2_Server_Callhandler_Instance instead.
*
* @category XML
* @package XML_RPC2
* @author Sergio Carvalho
* class EchoServer {
* /**
* * Echo the message
* *
* * @param string The string to echo
* * @return string The echo
* {@*}
* public function echoecho($string)
* {
* return $string;
* }
* }
*
* require_once 'XML/RPC2/Server.php';
* $someInstance = new EchoServer();
* $server = XML_RPC2_Server::create($someInstance);
* $server->handleCall();
*
*
* @category XML
* @package XML_RPC2
* @author Sergio Carvalho Description :
\n"; print "Parameters :
\n"; if (count($this->_parameters)>0) { print "Type | Name | Documentation |
$type | $name | $doc |
* XML_RPC2_Backend::setBackend('php');
* // or
* XML_RPC2_Backend::setBackend('xmlrpcext');
*
* Note that if you do not explicitely set the backend, it will be selected automatically.
*
* Internally, this class provides methods to obtain the relevant backend classes:
* - The server class
* - The client class
* - The value class
*
* @category XML
* @package XML_RPC2
* @author Sergio Carvalho
* require_once 'XML_RPC2/Client.php';
*
* $client = XML_RPC2_Client('http://xmlrpc.example.com/1.0/', 'example.');
* $result = $client->hello('Sergio');
* print($result);
*
*
* The above example will call the example.hello method on the xmlrpc.example.com
* server, under the /1.0/ URI.
*
* @category XML
* @package XML_RPC2
* @author Sergio Carvalho '; print "***** Request *****\n"; print htmlspecialchars($request); print "***** End Of request *****\n\n"; print "***** Server response *****\n"; print htmlspecialchars($body); print "\n***** End of server response *****\n\n"; } // }}} // {{{ printPostRequestDebugInformation() /** * Display debug informations (part 2) * * @param mixed $result decoded server response */ public static function printPostRequestDebugInformation($result) { print "***** Decoded result *****\n"; print_r($result); print "\n***** End of decoded result *****"; print ''; } // }}} // {{{ testMethodName___() /** * Return true is the given method name is ok with XML/RPC spec. * * NB : The '___' at the end of the method name is to avoid collisions with * XMLRPC __call() * * @param string $methodName method name * @return boolean true if ok */ public static function testMethodName($methodName) { return (preg_match('~^[a-zA-Z0-9_.:/]*$~', $methodName)); } // }}} } XML_RPC2-1.1.3/XML/RPC2/Exception.php 0000660 0000773 0000765 00000030443 12732312664 016654 0 ustar gauthierm dusers | * +-----------------------------------------------------------------------------+ * * @category XML * @package XML_RPC2 * @author Sergio Carvalho
* class ExampleServer {
* /**
* * hello says hello
* *
* * @param string Name
* * @return string Greetings
* {@*}
* public static function hello($name)
{
* return "Hello $name";
* }
* }
*
*
* Now, instantiate the server, using the Factory method to select a backend and a call handler for you:
*
* require_once 'XML/RPC2/Server.php';
* $server = XML_RPC2_Server::create('ExampleServer');
* $server->handleCall();
*
*
* This will create a server exporting all of the 'ExampleServer' class' methods. If you wish to export
* instance methods as well, pass an object instance to the factory instead:
*
* require_once 'XML/RPC2/Server.php';
* $server = XML_RPC2_Server::create(new ExampleServer());
* $server->handleCall();
*
*
* @category XML
* @package XML_RPC2
* @author Sergio Carvalho (return to index)
\n"; print "