@@ -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>xmlrpc - Which toolkit demo</title></head> |
@@ -28,14 +28,14 @@ discard block |
||
28 | 28 | // and ask the client to give us back xml |
29 | 29 | $client->return_type = 'xml'; |
30 | 30 | |
31 | -output("XML custom request:<br/><pre>" . htmlspecialchars($payload) . "</pre>\n"); |
|
31 | +output("XML custom request:<br/><pre>".htmlspecialchars($payload)."</pre>\n"); |
|
32 | 32 | |
33 | 33 | $resp = $client->send($payload); |
34 | 34 | |
35 | 35 | if (!$resp->faultCode()) { |
36 | 36 | |
37 | 37 | $xml = $resp->value(); |
38 | - output("XML response:<br/><pre>" . htmlspecialchars($xml) . "</pre>\n"); |
|
38 | + output("XML response:<br/><pre>".htmlspecialchars($xml)."</pre>\n"); |
|
39 | 39 | |
40 | 40 | $encoder = new Encoder(); |
41 | 41 | // from xml to xml-rpc Response |
@@ -47,14 +47,14 @@ discard block |
||
47 | 47 | |
48 | 48 | output("Toolkit info:<br/>\n"); |
49 | 49 | output("<pre>"); |
50 | - output("name: " . htmlspecialchars($value["toolkitName"]) . "\n"); |
|
51 | - output("version: " . htmlspecialchars($value["toolkitVersion"]) . "\n"); |
|
52 | - output("docs: " . htmlspecialchars($value["toolkitDocsUrl"]) . "\n"); |
|
53 | - output("os: " . htmlspecialchars($value["toolkitOperatingSystem"]) . "\n"); |
|
50 | + output("name: ".htmlspecialchars($value["toolkitName"])."\n"); |
|
51 | + output("version: ".htmlspecialchars($value["toolkitVersion"])."\n"); |
|
52 | + output("docs: ".htmlspecialchars($value["toolkitDocsUrl"])."\n"); |
|
53 | + output("os: ".htmlspecialchars($value["toolkitOperatingSystem"])."\n"); |
|
54 | 54 | output("</pre>"); |
55 | 55 | } else { |
56 | 56 | output("An error occurred: "); |
57 | - output("Code: " . htmlspecialchars($resp->faultCode()) . " Reason: '" . htmlspecialchars($resp->faultString()) . "'\n"); |
|
57 | + output("Code: ".htmlspecialchars($resp->faultCode())." Reason: '".htmlspecialchars($resp->faultString())."'\n"); |
|
58 | 58 | } |
59 | 59 | |
60 | 60 | output("</body></html>\n"); |
@@ -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>xmlrpc - Introspect demo</title></head> |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | function display_error($r) |
18 | 18 | { |
19 | 19 | output("An error occurred: "); |
20 | - output("Code: " . $r->faultCode() . " Reason: '" . $r->faultString() . "'<br/>"); |
|
20 | + output("Code: ".$r->faultCode()." Reason: '".$r->faultString()."'<br/>"); |
|
21 | 21 | } |
22 | 22 | |
23 | 23 | $client = new Client(XMLRPCSERVER); |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | $client->return_type = XMLParser::RETURN_PHP; |
26 | 26 | |
27 | 27 | // First off, let's retrieve the list of methods available on the remote server |
28 | -output("<h3>methods available at http://" . $client->server . $client->path . "</h3>\n"); |
|
28 | +output("<h3>methods available at http://".$client->server.$client->path."</h3>\n"); |
|
29 | 29 | $req = new Request('system.listMethods'); |
30 | 30 | $resp = $client->send($req); |
31 | 31 | |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | |
48 | 48 | // Then, retrieve the signature and help text of each available method |
49 | 49 | foreach ($v as $methodName) { |
50 | - output("<h4>" . htmlspecialchars($methodName) . "</h4>\n"); |
|
50 | + output("<h4>".htmlspecialchars($methodName)."</h4>\n"); |
|
51 | 51 | // build requests first, add params later |
52 | 52 | $r1 = new PhpXmlRpc\Request('system.methodHelp'); |
53 | 53 | $r2 = new PhpXmlRpc\Request('system.methodSignature'); |
@@ -83,12 +83,12 @@ discard block |
||
83 | 83 | continue; |
84 | 84 | } |
85 | 85 | $ret = $sig[0]; |
86 | - output("<code>" . htmlspecialchars($ret) . " " |
|
87 | - . htmlspecialchars($methodName) . "("); |
|
88 | - if (count($sig) > 1) { |
|
89 | - for ($k = 1; $k < count($sig); $k++) { |
|
86 | + output("<code>".htmlspecialchars($ret)." " |
|
87 | + . htmlspecialchars($methodName)."("); |
|
88 | + if (count($sig)>1) { |
|
89 | + for ($k = 1; $k<count($sig); $k++) { |
|
90 | 90 | output(htmlspecialchars($sig[$k])); |
91 | - if ($k < count($sig) - 1) { |
|
91 | + if ($k<count($sig)-1) { |
|
92 | 92 | output(", "); |
93 | 93 | } |
94 | 94 | } |