@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -require_once __DIR__ . "/_prepend.php"; |
|
| 2 | +require_once __DIR__."/_prepend.php"; |
|
| 3 | 3 | |
| 4 | 4 | output('<html lang="en"> |
| 5 | 5 | <head><title>phpxmlrpc - Introspect demo</title></head> |
@@ -18,7 +18,7 @@ discard block |
||
| 18 | 18 | function display_error($r) |
| 19 | 19 | { |
| 20 | 20 | output("An error occurred: "); |
| 21 | - output("Code: " . $r->faultCode() . " Reason: '" . $r->faultString() . "'<br/>"); |
|
| 21 | + output("Code: ".$r->faultCode()." Reason: '".$r->faultString()."'<br/>"); |
|
| 22 | 22 | } |
| 23 | 23 | |
| 24 | 24 | $client = new Client(XMLRPCSERVER); |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | $client->setOption(Client::OPT_RETURN_TYPE, XMLRPCParser::RETURN_PHP); |
| 27 | 27 | |
| 28 | 28 | // First off, let's retrieve the list of methods available on the remote server |
| 29 | -output("<h3>methods available at http://" . $client->getUrl(PHP_URL_HOST) . $client->getUrl(PHP_URL_PATH) . "</h3>\n"); |
|
| 29 | +output("<h3>methods available at http://".$client->getUrl(PHP_URL_HOST).$client->getUrl(PHP_URL_PATH)."</h3>\n"); |
|
| 30 | 30 | $req = new Request('system.listMethods'); |
| 31 | 31 | $resp = $client->send($req); |
| 32 | 32 | |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | |
| 49 | 49 | // Then, retrieve the signature and help text of each available method |
| 50 | 50 | foreach ($v as $methodName) { |
| 51 | - output("<h4>" . htmlspecialchars($methodName) . "</h4>\n"); |
|
| 51 | + output("<h4>".htmlspecialchars($methodName)."</h4>\n"); |
|
| 52 | 52 | // build requests first, add params later |
| 53 | 53 | $r1 = new Request('system.methodHelp'); |
| 54 | 54 | $r2 = new Request('system.methodSignature'); |
@@ -84,12 +84,12 @@ discard block |
||
| 84 | 84 | continue; |
| 85 | 85 | } |
| 86 | 86 | $ret = $sig[0]; |
| 87 | - output("<code>" . htmlspecialchars($ret) . " " |
|
| 88 | - . htmlspecialchars($methodName) . "("); |
|
| 89 | - if (count($sig) > 1) { |
|
| 90 | - for ($k = 1; $k < count($sig); $k++) { |
|
| 87 | + output("<code>".htmlspecialchars($ret)." " |
|
| 88 | + . htmlspecialchars($methodName)."("); |
|
| 89 | + if (count($sig)>1) { |
|
| 90 | + for ($k = 1; $k<count($sig); $k++) { |
|
| 91 | 91 | output(htmlspecialchars($sig[$k])); |
| 92 | - if ($k < count($sig) - 1) { |
|
| 92 | + if ($k<count($sig)-1) { |
|
| 93 | 93 | output(", "); |
| 94 | 94 | } |
| 95 | 95 | } |