|
| handleCall () |
| Receive the XML-RPC request, decode the HTTP payload, delegate execution to the call handler, and output the encoded call handler response. More...
|
|
| autoDocument () |
| autoDocument. More...
|
|
Definition at line 97 of file Server.php.
◆ __construct()
XML_RPC2_Server::__construct |
( |
|
$callHandler, |
|
|
|
$options = array() |
|
) |
| |
|
protected |
Create a new XML-RPC Server.
- Parameters
-
object | $callHandler | the call handler will receive a method call for each remote call received. |
| array | associative array of options |
Definition at line 160 of file Server.php.
References $callHandler, $options, and autoDocument().
167 $this->encoding =
$options[
'encoding'];
169 if ((isset(
$options[
'autoDocument'])) && (is_bool(
$options[
'autoDocument']))) {
172 if ((isset(
$options[
'autoDocumentExternalLinks'])) && (is_bool(
$options[
'autoDocumentExternalLinks']))) {
173 $this->autoDocumentExternalLinks =
$options[
'autoDocumentExternalLinks'];
175 if ((isset(
$options[
'signatureChecking'])) && (is_bool(
$options[
'signatureChecking']))) {
176 $this->signatureChecking =
$options[
'signatureChecking'];
autoDocument()
autoDocument.
if(!is_array($argv)) $options
◆ autoDocument()
XML_RPC2_Server::autoDocument |
( |
| ) |
|
autoDocument.
Produce an HTML page from the result of server introspection
- Returns
- string HTML document describing this server
Definition at line 260 of file Server.php.
Referenced by __construct(), XML_RPC2_Backend_Php_Server\handleCall(), and XML_RPC2_Backend_Xmlrpcext_Server\handleCall().
263 print
"<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n";
264 print
"<html xmlns=\"http://www.w3.org/1999/xhtml\" lang=\"en\" xml:lang=\"en\">\n";
266 print
" <meta http-equiv=\"Content-Type\" content=\"text/HTML; charset=" . $this->encoding .
"\" />\n";
267 print
" <title>Available XMLRPC methods for this server</title>\n";
268 print
" <style type=\"text/css\">\n";
269 print
" li,p { font-size: 10pt; font-family: Arial,Helvetia,sans-serif; }\n";
270 print
" a:link { background-color: white; color: blue; text-decoration: underline; font-weight: bold; }\n";
271 print
" a:visited { background-color: white; color: blue; text-decoration: underline; font-weight: bold; }\n";
272 print
" table { border-collapse:collapse; width: 100% }\n";
273 print
" table,td { padding: 5px; border: 1px solid black; }\n";
274 print
" div.bloc { border: 1px dashed gray; padding: 10px; margin-bottom: 20px; }\n";
275 print
" div.description { border: 1px solid black; padding: 10px; }\n";
276 print
" span.type { background-color: white; color: gray; font-weight: normal; }\n";
277 print
" span.paratype { background-color: white; color: gray; font-weight: normal; }\n";
278 print
" span.name { background-color: white; color: #660000; }\n";
279 print
" span.paraname { background-color: white; color: #336600; }\n";
280 print
" img { border: 0px; }\n";
281 print
" li { font-size: 12pt; }\n";
285 print
" <h1>Available XMLRPC methods for this server</h1>\n";
286 print
" <h2><a name=\"index\">Index</a></h2>\n";
288 foreach ($this->callHandler->getMethods() as $method) {
289 $name = $method->getName();
291 $signature = $method->getHTMLSignature();
292 print
" <li><a href=\"#$id\">$name()</a></li>\n";
295 print
" <h2>Details</h2>\n";
296 foreach ($this->callHandler->getMethods() as $method) {
297 print
" <div class=\"bloc\">\n";
298 $method->autoDocument();
299 print
" <p>(return to <a href=\"#index\">index</a>)</p>\n";
302 if (!($this->autoDocumentExternalLinks)) {
303 print
' <p><a href="http://pear.php.net/packages/XML_RPC2"><img src="http://pear.php.net/gifs/pear-power.png" alt="Powered by PEAR/XML_RPC2" height="31" width="88" /></a> <a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0 Strict" height="31" width="88" /></a> <a href="http://jigsaw.w3.org/css-validator/"><img style="border:0;width:88px;height:31px" src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!" /></a></p>' .
"\n";
◆ create()
static XML_RPC2_Server::create |
( |
|
$callTarget, |
|
|
|
$options = array() |
|
) |
| |
|
static |
◆ errorToException()
static XML_RPC2_Server::errorToException |
( |
|
$errno, |
|
|
|
$errstr, |
|
|
|
$errfile, |
|
|
|
$errline |
|
) |
| |
|
static |
Transform an error into an exception.
- Parameters
-
int | $errno | error number |
string | $errstr | error string |
string | $errfile | error file |
int | $errline | error line |
Definition at line 236 of file Server.php.
248 throw new Exception(
'Classic error reported "' . $errstr .
'" on ' . $errfile .
':' . $errline);
◆ getContentLength()
XML_RPC2_Server::getContentLength |
( |
|
$content | ) |
|
|
protected |
◆ handleCall()
XML_RPC2_Server::handleCall |
( |
| ) |
|
|
abstract |
Receive the XML-RPC request, decode the HTTP payload, delegate execution to the call handler, and output the encoded call handler response.
Referenced by create().
◆ $autoDocument
XML_RPC2_Server::$autoDocument = true |
|
protected |
◆ $autoDocumentExternalLinks
XML_RPC2_Server::$autoDocumentExternalLinks = true |
|
protected |
◆ $callHandler
XML_RPC2_Server::$callHandler = null |
|
protected |
◆ $encoding
XML_RPC2_Server::$encoding = 'iso-8859-1' |
|
protected |
◆ $prefix
XML_RPC2_Server::$prefix = '' |
|
protected |
◆ $signatureChecking
XML_RPC2_Server::$signatureChecking = true |
|
protected |
The documentation for this class was generated from the following file: