@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -require_once __DIR__ . "/_prepend.php"; |
|
3 | +require_once __DIR__."/_prepend.php"; |
|
4 | 4 | |
5 | 5 | use PhpXmlRpc\Value; |
6 | 6 | |
@@ -31,8 +31,8 @@ discard block |
||
31 | 31 | $count = 0; |
32 | 32 | } |
33 | 33 | // add the new comment in |
34 | - dba_insert($msgID . "_comment_${count}", $comment, $dbh); |
|
35 | - dba_insert($msgID . "_name_${count}", $name, $dbh); |
|
34 | + dba_insert($msgID."_comment_${count}", $comment, $dbh); |
|
35 | + dba_insert($msgID."_name_${count}", $name, $dbh); |
|
36 | 36 | $count++; |
37 | 37 | dba_replace($countID, $count, $dbh); |
38 | 38 | dba_close($dbh); |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | $countID = "${msgID}_count"; |
66 | 66 | if (dba_exists($countID, $dbh)) { |
67 | 67 | $count = dba_fetch($countID, $dbh); |
68 | - for ($i = 0; $i < $count; $i++) { |
|
68 | + for ($i = 0; $i<$count; $i++) { |
|
69 | 69 | $name = dba_fetch("${msgID}_name_${i}", $dbh); |
70 | 70 | $comment = dba_fetch("${msgID}_comment_${i}", $dbh); |
71 | 71 | // push a new struct onto the return array |
@@ -101,4 +101,4 @@ discard block |
||
101 | 101 | ), |
102 | 102 | )); |
103 | 103 | |
104 | -require_once __DIR__ . "/_append.php"; |
|
104 | +require_once __DIR__."/_append.php"; |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | * Please do not copy this file verbatim into your production server. |
10 | 10 | **/ |
11 | 11 | |
12 | -require_once __DIR__ . "/_prepend.php"; |
|
12 | +require_once __DIR__."/_prepend.php"; |
|
13 | 13 | |
14 | 14 | use PhpXmlRpc\Value; |
15 | 15 | |
@@ -105,11 +105,11 @@ discard block |
||
105 | 105 | // extract the value of the state number |
106 | 106 | $snv = $sno->scalarval(); |
107 | 107 | // look it up in our array (zero-based) |
108 | - if (isset($stateNames[$snv - 1])) { |
|
109 | - $stateName = $stateNames[$snv - 1]; |
|
108 | + if (isset($stateNames[$snv-1])) { |
|
109 | + $stateName = $stateNames[$snv-1]; |
|
110 | 110 | } else { |
111 | 111 | // not there, so complain |
112 | - $err = "I don't have a state for the index '" . $snv . "'"; |
|
112 | + $err = "I don't have a state for the index '".$snv."'"; |
|
113 | 113 | } |
114 | 114 | |
115 | 115 | // if we generated an error, create an error return response |
@@ -135,11 +135,11 @@ discard block |
||
135 | 135 | { |
136 | 136 | global $stateNames; |
137 | 137 | |
138 | - if (isset($stateNames[$stateNo - 1])) { |
|
139 | - return $stateNames[$stateNo - 1]; |
|
138 | + if (isset($stateNames[$stateNo-1])) { |
|
139 | + return $stateNames[$stateNo-1]; |
|
140 | 140 | } else { |
141 | 141 | // not, there so complain |
142 | - throw new Exception("I don't have a state for the index '" . $stateNo . "'", PhpXmlRpc\PhpXmlRpc::$xmlrpcerruser); |
|
142 | + throw new Exception("I don't have a state for the index '".$stateNo."'", PhpXmlRpc\PhpXmlRpc::$xmlrpcerruser); |
|
143 | 143 | } |
144 | 144 | } |
145 | 145 | |
@@ -169,17 +169,17 @@ discard block |
||
169 | 169 | eval($findstate9_sig['source']); |
170 | 170 | |
171 | 171 | $findstate10_sig = array( |
172 | - "function" => function ($req) { return findState($req); }, |
|
172 | + "function" => function($req) { return findState($req); }, |
|
173 | 173 | "signature" => $findstate_sig, |
174 | 174 | "docstring" => $findstate_doc, |
175 | 175 | ); |
176 | 176 | |
177 | -$findstate11_sig = $wrapper->wrapPhpFunction(function ($stateNo) { return inner_findstate($stateNo); }); |
|
177 | +$findstate11_sig = $wrapper->wrapPhpFunction(function($stateNo) { return inner_findstate($stateNo); }); |
|
178 | 178 | |
179 | 179 | $c = new xmlrpcServerMethodsContainer; |
180 | 180 | $moreSignatures = $wrapper->wrapPhpClass($c, array('prefix' => 'tests.', 'method_type' => 'all')); |
181 | 181 | |
182 | -$returnObj_sig = $wrapper->wrapPhpFunction(array($c, 'returnObject'), '', array('encode_php_objs' => true)); |
|
182 | +$returnObj_sig = $wrapper->wrapPhpFunction(array($c, 'returnObject'), '', array('encode_php_objs' => true)); |
|
183 | 183 | |
184 | 184 | // used to test signatures with NULL params |
185 | 185 | $findstate12_sig = array( |
@@ -205,7 +205,7 @@ discard block |
||
205 | 205 | $s = $req->getParam(0); |
206 | 206 | $t = $req->getParam(1); |
207 | 207 | |
208 | - return new PhpXmlRpc\Response(new Value($s->scalarval() + $t->scalarval(), Value::$xmlrpcInt)); |
|
208 | + return new PhpXmlRpc\Response(new Value($s->scalarval()+$t->scalarval(), Value::$xmlrpcInt)); |
|
209 | 209 | } |
210 | 210 | |
211 | 211 | $addtwodouble_sig = array(array(Value::$xmlrpcDouble, Value::$xmlrpcDouble, Value::$xmlrpcDouble)); |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | $s = $req->getParam(0); |
216 | 216 | $t = $req->getParam(1); |
217 | 217 | |
218 | - return new PhpXmlRpc\Response(new Value($s->scalarval() + $t->scalarval(), Value::$xmlrpcDouble)); |
|
218 | + return new PhpXmlRpc\Response(new Value($s->scalarval()+$t->scalarval(), Value::$xmlrpcDouble)); |
|
219 | 219 | } |
220 | 220 | |
221 | 221 | $stringecho_sig = array(array(Value::$xmlrpcString, Value::$xmlrpcString)); |
@@ -231,7 +231,7 @@ discard block |
||
231 | 231 | function echoBack($req) |
232 | 232 | { |
233 | 233 | // just sends back a string with what i got sent to me, just escaped, that's all |
234 | - $s = "I got the following message:\n" . $req->serialize(); |
|
234 | + $s = "I got the following message:\n".$req->serialize(); |
|
235 | 235 | |
236 | 236 | return new PhpXmlRpc\Response(new Value($s)); |
237 | 237 | } |
@@ -288,7 +288,7 @@ discard block |
||
288 | 288 | return 0; |
289 | 289 | } |
290 | 290 | |
291 | - return ($agesorter_arr[$a] > $agesorter_arr[$b]) ? -1 : 1; |
|
291 | + return ($agesorter_arr[$a]>$agesorter_arr[$b]) ? -1 : 1; |
|
292 | 292 | } |
293 | 293 | |
294 | 294 | $agesorter_sig = array(array(Value::$xmlrpcArray, Value::$xmlrpcArray)); |
@@ -334,7 +334,7 @@ discard block |
||
334 | 334 | // hack, must make global as uksort() won't |
335 | 335 | // allow us to pass any other auxiliary information |
336 | 336 | uksort($agesorter_arr, 'agesorter_compare'); |
337 | - foreach($agesorter_arr as $key => $val) { |
|
337 | + foreach ($agesorter_arr as $key => $val) { |
|
338 | 338 | // recreate each struct element |
339 | 339 | $v[] = new Value( |
340 | 340 | array( |
@@ -389,17 +389,17 @@ discard block |
||
389 | 389 | $err = "Error, no 'From' field specified"; |
390 | 390 | } |
391 | 391 | |
392 | - $msgHdr = "From: " . $mFrom->scalarval() . "\n"; |
|
393 | - $msgHdr .= "To: " . $mTo->scalarval() . "\n"; |
|
392 | + $msgHdr = "From: ".$mFrom->scalarval()."\n"; |
|
393 | + $msgHdr .= "To: ".$mTo->scalarval()."\n"; |
|
394 | 394 | |
395 | 395 | if ($mCc->scalarval() != "") { |
396 | - $msgHdr .= "Cc: " . $mCc->scalarval() . "\n"; |
|
396 | + $msgHdr .= "Cc: ".$mCc->scalarval()."\n"; |
|
397 | 397 | } |
398 | 398 | if ($mBcc->scalarval() != "") { |
399 | - $msgHdr .= "Bcc: " . $mBcc->scalarval() . "\n"; |
|
399 | + $msgHdr .= "Bcc: ".$mBcc->scalarval()."\n"; |
|
400 | 400 | } |
401 | 401 | if ($mMime->scalarval() != "") { |
402 | - $msgHdr .= "Content-type: " . $mMime->scalarval() . "\n"; |
|
402 | + $msgHdr .= "Content-type: ".$mMime->scalarval()."\n"; |
|
403 | 403 | } |
404 | 404 | $msgHdr .= "X-Mailer: XML-RPC for PHP mailer 1.0"; |
405 | 405 | |
@@ -489,7 +489,7 @@ discard block |
||
489 | 489 | $moe = $sno["moe"]; |
490 | 490 | $larry = $sno["larry"]; |
491 | 491 | $curly = $sno["curly"]; |
492 | - $num = $moe->scalarval() + $larry->scalarval() + $curly->scalarval(); |
|
492 | + $num = $moe->scalarval()+$larry->scalarval()+$curly->scalarval(); |
|
493 | 493 | |
494 | 494 | return new PhpXmlRpc\Response(new Value($num, Value::$xmlrpcInt)); |
495 | 495 | } |
@@ -531,9 +531,9 @@ discard block |
||
531 | 531 | $ar = $req->getParam(0); |
532 | 532 | $sz = $ar->count(); |
533 | 533 | $first = $ar[0]; |
534 | - $last = $ar[$sz - 1]; |
|
534 | + $last = $ar[$sz-1]; |
|
535 | 535 | |
536 | - return new PhpXmlRpc\Response(new Value($first->scalarval() . |
|
536 | + return new PhpXmlRpc\Response(new Value($first->scalarval(). |
|
537 | 537 | $last->scalarval(), Value::$xmlrpcString)); |
538 | 538 | } |
539 | 539 | |
@@ -567,7 +567,7 @@ discard block |
||
567 | 567 | $larry = $fools["larry"]; |
568 | 568 | $moe = $fools["moe"]; |
569 | 569 | |
570 | - return new PhpXmlRpc\Response(new Value($curly->scalarval() + $larry->scalarval() + $moe->scalarval(), Value::$xmlrpcInt)); |
|
570 | + return new PhpXmlRpc\Response(new Value($curly->scalarval()+$larry->scalarval()+$moe->scalarval(), Value::$xmlrpcInt)); |
|
571 | 571 | } |
572 | 572 | |
573 | 573 | $v1_countTheEntities_sig = array(array(Value::$xmlrpcStruct, Value::$xmlrpcString)); |
@@ -581,7 +581,7 @@ discard block |
||
581 | 581 | $ap = 0; |
582 | 582 | $qu = 0; |
583 | 583 | $amp = 0; |
584 | - for ($i = 0; $i < strlen($str); $i++) { |
|
584 | + for ($i = 0; $i<strlen($str); $i++) { |
|
585 | 585 | $c = substr($str, $i, 1); |
586 | 586 | switch ($c) { |
587 | 587 | case ">": |
@@ -783,7 +783,7 @@ discard block |
||
783 | 783 | ), |
784 | 784 | // Greek word 'kosme'. NB: NOT a valid ISO8859 string! |
785 | 785 | // NB: we can only register this when setting internal encoding to UTF-8, or it will break system.listMethods |
786 | - "tests.utf8methodname." . 'κόσμε' => array( |
|
786 | + "tests.utf8methodname.".'κόσμε' => array( |
|
787 | 787 | "function" => "stringEcho", |
788 | 788 | "signature" => $stringecho_sig, |
789 | 789 | "docstring" => $stringecho_doc, |
@@ -976,4 +976,4 @@ discard block |
||
976 | 976 | $s->service(); |
977 | 977 | // That should do all we need! |
978 | 978 | |
979 | -require_once __DIR__ . "/_append.php"; |
|
979 | +require_once __DIR__."/_append.php"; |
@@ -3,5 +3,5 @@ |
||
3 | 3 | // Out-of-band information: let the client manipulate the server operations. |
4 | 4 | // We do this to help the testsuite script: do not reproduce in production! |
5 | 5 | if (isset($_COOKIE['PHPUNIT_SELENIUM_TEST_ID']) && extension_loaded('xdebug')) { |
6 | - include_once __DIR__ . "/../../vendor/phpunit/phpunit-selenium/PHPUnit/Extensions/SeleniumCommon/append.php"; |
|
6 | + include_once __DIR__."/../../vendor/phpunit/phpunit-selenium/PHPUnit/Extensions/SeleniumCommon/append.php"; |
|
7 | 7 | } |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | * @license code licensed under the BSD License: see file license.txt |
10 | 10 | */ |
11 | 11 | |
12 | -require_once __DIR__ . "/_prepend.php"; |
|
12 | +require_once __DIR__."/_prepend.php"; |
|
13 | 13 | |
14 | 14 | /** |
15 | 15 | * Forward an xmlrpc request to another server, and return to client the response received. |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | $url = $encoder->decode($req->getParam(0)); |
30 | 30 | $client = new PhpXmlRpc\Client($url); |
31 | 31 | |
32 | - if ($req->getNumParams() > 3) { |
|
32 | + if ($req->getNumParams()>3) { |
|
33 | 33 | // we have to set some options onto the client. |
34 | 34 | // Note that if we do not untaint the received values, warnings might be generated... |
35 | 35 | $options = $encoder->decode($req->getParam(3)); |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | $client->setSSLVerifyPeer($val); |
50 | 50 | break; |
51 | 51 | case 'Timeout': |
52 | - $timeout = (integer)$val; |
|
52 | + $timeout = (integer) $val; |
|
53 | 53 | break; |
54 | 54 | } // switch |
55 | 55 | } |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | } |
68 | 68 | |
69 | 69 | // add debug info into response we give back to caller |
70 | - PhpXmlRpc\Server::xmlrpc_debugmsg("Sending to server $url the payload: " . $req->serialize()); |
|
70 | + PhpXmlRpc\Server::xmlrpc_debugmsg("Sending to server $url the payload: ".$req->serialize()); |
|
71 | 71 | |
72 | 72 | return $client->send($req, $timeout); |
73 | 73 | } |
@@ -88,4 +88,4 @@ discard block |
||
88 | 88 | ) |
89 | 89 | ); |
90 | 90 | |
91 | -require_once __DIR__ . "/_append.php"; |
|
91 | +require_once __DIR__."/_append.php"; |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php require_once __DIR__ . "/_prepend.php"; ?><html lang="en"> |
|
1 | +<?php require_once __DIR__."/_prepend.php"; ?><html lang="en"> |
|
2 | 2 | <head><title>xmlrpc - Introspect demo</title></head> |
3 | 3 | <body> |
4 | 4 | <h1>Introspect demo</h1> |
@@ -10,14 +10,14 @@ discard block |
||
10 | 10 | function display_error($r) |
11 | 11 | { |
12 | 12 | print "An error occurred: "; |
13 | - print "Code: " . $r->faultCode() |
|
14 | - . " Reason: '" . $r->faultString() . "'<br/>"; |
|
13 | + print "Code: ".$r->faultCode() |
|
14 | + . " Reason: '".$r->faultString()."'<br/>"; |
|
15 | 15 | } |
16 | 16 | |
17 | 17 | $client = new PhpXmlRpc\Client(XMLRPCSERVER); |
18 | 18 | |
19 | 19 | // First off, let's retrieve the list of methods available on the remote server |
20 | -print "<h3>methods available at http://" . $client->server . $client->path . "</h3>\n"; |
|
20 | +print "<h3>methods available at http://".$client->server.$client->path."</h3>\n"; |
|
21 | 21 | $req = new PhpXmlRpc\Request('system.listMethods'); |
22 | 22 | $resp = $client->send($req); |
23 | 23 | |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | |
29 | 29 | // Then, retrieve the signature and help text of each available method |
30 | 30 | foreach ($v as $methodName) { |
31 | - print "<h4>" . $methodName->scalarval() . "</h4>\n"; |
|
31 | + print "<h4>".$methodName->scalarval()."</h4>\n"; |
|
32 | 32 | // build messages first, add params later |
33 | 33 | $m1 = new PhpXmlRpc\Request('system.methodHelp'); |
34 | 34 | $m2 = new PhpXmlRpc\Request('system.methodSignature'); |
@@ -59,13 +59,13 @@ discard block |
||
59 | 59 | if ($val->kindOf() == "array") { |
60 | 60 | foreach ($val as $x) { |
61 | 61 | $ret = $x[0]; |
62 | - print "<code>" . htmlspecialchars($ret->scalarval()) . " " |
|
63 | - . htmlspecialchars($methodName->scalarval()) . "("; |
|
64 | - if ($x->count() > 1) { |
|
65 | - for ($k = 1; $k < $x->count(); $k++) { |
|
62 | + print "<code>".htmlspecialchars($ret->scalarval())." " |
|
63 | + . htmlspecialchars($methodName->scalarval())."("; |
|
64 | + if ($x->count()>1) { |
|
65 | + for ($k = 1; $k<$x->count(); $k++) { |
|
66 | 66 | $y = $x[$k]; |
67 | 67 | print htmlspecialchars($y->scalarval()); |
68 | - if ($k < $x->count() - 1) { |
|
68 | + if ($k<$x->count()-1) { |
|
69 | 69 | print ", "; |
70 | 70 | } |
71 | 71 | } |
@@ -81,4 +81,4 @@ discard block |
||
81 | 81 | } |
82 | 82 | ?> |
83 | 83 | </body> |
84 | -</html><?php require_once __DIR__ . "/_append.php"; ?> |
|
84 | +</html><?php require_once __DIR__."/_append.php"; ?> |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php require_once __DIR__ . "/_prepend.php"; ?><html lang="en"> |
|
1 | +<?php require_once __DIR__."/_prepend.php"; ?><html lang="en"> |
|
2 | 2 | <head><title>xmlrpc - Getstatename demo</title></head> |
3 | 3 | <body> |
4 | 4 | <h1>Getstatename demo</h1> |
@@ -11,32 +11,32 @@ discard block |
||
11 | 11 | <?php |
12 | 12 | |
13 | 13 | if (isset($_POST["stateno"]) && $_POST["stateno"] != "") { |
14 | - $stateNo = (integer)$_POST["stateno"]; |
|
14 | + $stateNo = (integer) $_POST["stateno"]; |
|
15 | 15 | $encoder = new PhpXmlRpc\Encoder(); |
16 | 16 | $req = new PhpXmlRpc\Request('examples.getStateName', |
17 | 17 | array($encoder->encode($stateNo)) |
18 | 18 | ); |
19 | - print "Sending the following request:<pre>\n\n" . htmlentities($req->serialize()) . "\n\n</pre>Debug info of server data follows...\n\n"; |
|
19 | + print "Sending the following request:<pre>\n\n".htmlentities($req->serialize())."\n\n</pre>Debug info of server data follows...\n\n"; |
|
20 | 20 | $client = new PhpXmlRpc\Client(XMLRPCSERVER); |
21 | 21 | $client->setDebug(1); |
22 | 22 | $r = $client->send($req); |
23 | 23 | if (!$r->faultCode()) { |
24 | 24 | $v = $r->value(); |
25 | - print "<br/>State number <b>" . $stateNo . "</b> is <b>" |
|
26 | - . htmlspecialchars($encoder->decode($v)) . "</b><br/><br/>"; |
|
25 | + print "<br/>State number <b>".$stateNo."</b> is <b>" |
|
26 | + . htmlspecialchars($encoder->decode($v))."</b><br/><br/>"; |
|
27 | 27 | } else { |
28 | 28 | print "An error occurred: "; |
29 | - print "Code: " . htmlspecialchars($r->faultCode()) |
|
30 | - . " Reason: '" . htmlspecialchars($r->faultString()) . "'</pre><br/>"; |
|
29 | + print "Code: ".htmlspecialchars($r->faultCode()) |
|
30 | + . " Reason: '".htmlspecialchars($r->faultString())."'</pre><br/>"; |
|
31 | 31 | } |
32 | 32 | } else { |
33 | 33 | $stateNo = ""; |
34 | 34 | } |
35 | 35 | |
36 | 36 | print "<form action=\"getstatename.php\" method=\"POST\"> |
37 | -<input name=\"stateno\" value=\"" . $stateNo . "\"><input type=\"submit\" value=\"go\" name=\"submit\"></form> |
|
37 | +<input name=\"stateno\" value=\"" . $stateNo."\"><input type=\"submit\" value=\"go\" name=\"submit\"></form> |
|
38 | 38 | <p>Enter a state number to query its name</p>"; |
39 | 39 | |
40 | 40 | ?> |
41 | 41 | </body> |
42 | -</html><?php require_once __DIR__ . "/_append.php"; ?> |
|
42 | +</html><?php require_once __DIR__."/_append.php"; ?> |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php require_once __DIR__ . "/_prepend.php"; ?><html lang="en"> |
|
1 | +<?php require_once __DIR__."/_prepend.php"; ?><html lang="en"> |
|
2 | 2 | <head><title>xmlrpc - Agesort demo</title></head> |
3 | 3 | <body> |
4 | 4 | <h1>Agesort demo</h1> |
@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | $inAr = array("Dave" => 24, "Edd" => 45, "Joe" => 37, "Fred" => 27); |
14 | 14 | print "This is the input data:<br/><pre>"; |
15 | 15 | foreach ($inAr as $key => $val) { |
16 | - print $key . ", " . $val . "\n"; |
|
16 | + print $key.", ".$val."\n"; |
|
17 | 17 | } |
18 | 18 | print "</pre>"; |
19 | 19 | |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | ); |
30 | 30 | } |
31 | 31 | $v = new PhpXmlRpc\Value($p, "array"); |
32 | -print "Encoded into xmlrpc format it looks like this: <pre>\n" . htmlentities($v->serialize()) . "</pre>\n"; |
|
32 | +print "Encoded into xmlrpc format it looks like this: <pre>\n".htmlentities($v->serialize())."</pre>\n"; |
|
33 | 33 | |
34 | 34 | // create client and message objects |
35 | 35 | $req = new PhpXmlRpc\Request('examples.sortByAge', array($v)); |
@@ -49,17 +49,17 @@ discard block |
||
49 | 49 | foreach ($value as $struct) { |
50 | 50 | $name = $struct["name"]; |
51 | 51 | $age = $struct["age"]; |
52 | - print htmlspecialchars($name->scalarval()) . ", " . htmlspecialchars($age->scalarval()) . "\n"; |
|
52 | + print htmlspecialchars($name->scalarval()).", ".htmlspecialchars($age->scalarval())."\n"; |
|
53 | 53 | } |
54 | 54 | |
55 | - print "<hr/>For nerds: I got this value back<br/><pre>" . |
|
56 | - htmlentities($resp->serialize()) . "</pre><hr/>\n"; |
|
55 | + print "<hr/>For nerds: I got this value back<br/><pre>". |
|
56 | + htmlentities($resp->serialize())."</pre><hr/>\n"; |
|
57 | 57 | } else { |
58 | 58 | print "An error occurred:<pre>"; |
59 | - print "Code: " . htmlspecialchars($resp->faultCode()) . |
|
60 | - "\nReason: '" . htmlspecialchars($resp->faultString()) . '\'</pre><hr/>'; |
|
59 | + print "Code: ".htmlspecialchars($resp->faultCode()). |
|
60 | + "\nReason: '".htmlspecialchars($resp->faultString()).'\'</pre><hr/>'; |
|
61 | 61 | } |
62 | 62 | |
63 | 63 | ?> |
64 | 64 | </body> |
65 | -</html><?php require_once __DIR__ . "/_append.php"; ?> |
|
65 | +</html><?php require_once __DIR__."/_append.php"; ?> |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php require_once __DIR__ . "/_prepend.php"; ?><html lang="en"> |
|
1 | +<?php require_once __DIR__."/_prepend.php"; ?><html lang="en"> |
|
2 | 2 | <head><title>xmlrpc - Webservice wrappper demo</title></head> |
3 | 3 | <body> |
4 | 4 | <h1>Webservice wrappper demo</h1> |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | $client->return_type = 'phpvals'; // let client give us back php values instead of xmlrpcvals |
18 | 18 | $resp = $client->send(new PhpXmlRpc\Request('system.listMethods')); |
19 | 19 | if ($resp->faultCode()) { |
20 | - echo "<p>Server methods list could not be retrieved: error {$resp->faultCode()} '" . htmlspecialchars($resp->faultString()) . "'</p>\n"; |
|
20 | + echo "<p>Server methods list could not be retrieved: error {$resp->faultCode()} '".htmlspecialchars($resp->faultString())."'</p>\n"; |
|
21 | 21 | } else { |
22 | 22 | echo "<p>Server methods list retrieved, now wrapping it up...</p>\n<ul>\n"; |
23 | 23 | flush(); |
@@ -29,9 +29,9 @@ discard block |
||
29 | 29 | if ($methodName == 'examples.getStateName') { |
30 | 30 | $callable = $wrapper->wrapXmlrpcMethod($client, $methodName); |
31 | 31 | if ($callable) { |
32 | - echo "<li>Remote server method " . htmlspecialchars($methodName) . " wrapped into php function</li>\n"; |
|
32 | + echo "<li>Remote server method ".htmlspecialchars($methodName)." wrapped into php function</li>\n"; |
|
33 | 33 | } else { |
34 | - echo "<li>Remote server method " . htmlspecialchars($methodName) . " could not be wrapped!</li>\n"; |
|
34 | + echo "<li>Remote server method ".htmlspecialchars($methodName)." could not be wrapped!</li>\n"; |
|
35 | 35 | } |
36 | 36 | break; |
37 | 37 | } |
@@ -49,4 +49,4 @@ discard block |
||
49 | 49 | } |
50 | 50 | ?> |
51 | 51 | </body> |
52 | -</html><?php require_once __DIR__ . "/_append.php"; ?> |
|
52 | +</html><?php require_once __DIR__."/_append.php"; ?> |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php require_once __DIR__ . "/_prepend.php"; ?><html lang="en"> |
|
1 | +<?php require_once __DIR__."/_prepend.php"; ?><html lang="en"> |
|
2 | 2 | <head><title>xmlrpc - Proxy demo</title></head> |
3 | 3 | <body> |
4 | 4 | <h1>proxy demo</h1> |
@@ -56,4 +56,4 @@ discard block |
||
56 | 56 | |
57 | 57 | echo "State $stateNo is ".htmlspecialchars($stateName); |
58 | 58 | |
59 | -require_once __DIR__ . "/_append.php"; |
|
59 | +require_once __DIR__."/_append.php"; |