@@ -19,9 +19,9 @@ discard block |
||
19 | 19 | use PhpXmlRpc\Response; |
20 | 20 | use PhpXmlRpc\Encoder; |
21 | 21 | |
22 | -include_once __DIR__ . '/../vendor/autoload.php'; |
|
22 | +include_once __DIR__.'/../vendor/autoload.php'; |
|
23 | 23 | |
24 | -include __DIR__ . '/parse_args.php'; |
|
24 | +include __DIR__.'/parse_args.php'; |
|
25 | 25 | $args = argParser::getArgs(); |
26 | 26 | |
27 | 27 | function begin_test($test_name, $test_case) |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | if (!isset($test_results[$test_name][$test_case])) { |
42 | 42 | trigger_error('ending test that was not started'); |
43 | 43 | } |
44 | - $test_results[$test_name][$test_case]['time'] = $end - $test_results[$test_name][$test_case]['time']; |
|
44 | + $test_results[$test_name][$test_case]['time'] = $end-$test_results[$test_name][$test_case]['time']; |
|
45 | 45 | $test_results[$test_name][$test_case]['result'] = $test_result; |
46 | 46 | echo '.'; |
47 | 47 | flush(); |
@@ -75,24 +75,24 @@ discard block |
||
75 | 75 | } |
76 | 76 | |
77 | 77 | if ($is_web) { |
78 | - echo "<h3>Using lib version: " . PhpXmlRpc::$xmlrpcVersion . " on PHP version: " . phpversion() . "</h3>\n"; |
|
78 | + echo "<h3>Using lib version: ".PhpXmlRpc::$xmlrpcVersion." on PHP version: ".phpversion()."</h3>\n"; |
|
79 | 79 | if ($xd) { |
80 | - echo "<h4>XDEBUG profiling enabled: skipping remote tests. Trace file is: " . htmlspecialchars(xdebug_get_profiler_filename()) . "</h4>\n"; |
|
80 | + echo "<h4>XDEBUG profiling enabled: skipping remote tests. Trace file is: ".htmlspecialchars(xdebug_get_profiler_filename())."</h4>\n"; |
|
81 | 81 | } |
82 | 82 | flush(); |
83 | 83 | ob_flush(); |
84 | 84 | } else { |
85 | - echo "Using lib version: " . PhpXmlRpc::$xmlrpcVersion . " on PHP version: " . phpversion() . "\n"; |
|
85 | + echo "Using lib version: ".PhpXmlRpc::$xmlrpcVersion." on PHP version: ".phpversion()."\n"; |
|
86 | 86 | if ($xd) { |
87 | - echo "XDEBUG profiling enabled: skipping remote tests\nTrace file is: " . xdebug_get_profiler_filename() . "\n"; |
|
87 | + echo "XDEBUG profiling enabled: skipping remote tests\nTrace file is: ".xdebug_get_profiler_filename()."\n"; |
|
88 | 88 | } |
89 | 89 | } |
90 | 90 | |
91 | 91 | // test 'manual style' data encoding vs. 'automatic style' encoding |
92 | 92 | begin_test('Data encoding (large array)', 'manual encoding'); |
93 | -for ($i = 0; $i < $num_tests; $i++) { |
|
93 | +for ($i = 0; $i<$num_tests; $i++) { |
|
94 | 94 | $vals = array(); |
95 | - for ($j = 0; $j < 10; $j++) { |
|
95 | + for ($j = 0; $j<10; $j++) { |
|
96 | 96 | $valarray = array(); |
97 | 97 | foreach ($data[$j] as $key => $val) { |
98 | 98 | $values = array(); |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | |
118 | 118 | begin_test('Data encoding (large array)', 'automatic encoding'); |
119 | 119 | $encoder = new Encoder(); |
120 | -for ($i = 0; $i < $num_tests; $i++) { |
|
120 | +for ($i = 0; $i<$num_tests; $i++) { |
|
121 | 121 | $value = $encoder->encode($data, array('auto_dates')); |
122 | 122 | $out = $value->serialize(); |
123 | 123 | } |
@@ -125,8 +125,8 @@ discard block |
||
125 | 125 | |
126 | 126 | if (function_exists('xmlrpc_set_type')) { |
127 | 127 | begin_test('Data encoding (large array)', 'xmlrpc-epi encoding'); |
128 | - for ($i = 0; $i < $num_tests; $i++) { |
|
129 | - for ($j = 0; $j < 10; $j++) { |
|
128 | + for ($i = 0; $i<$num_tests; $i++) { |
|
129 | + for ($j = 0; $j<10; $j++) { |
|
130 | 130 | foreach ($keys as $k) { |
131 | 131 | xmlrpc_set_type($data[$j][$k][4], 'datetime'); |
132 | 132 | xmlrpc_set_type($data[$j][$k][8], 'datetime'); |
@@ -140,18 +140,18 @@ discard block |
||
140 | 140 | // test 'old style' data decoding vs. 'automatic style' decoding |
141 | 141 | $dummy = new Request(''); |
142 | 142 | $out = new Response($value); |
143 | -$in = '<?xml version="1.0" ?>' . "\n" . $out->serialize(); |
|
143 | +$in = '<?xml version="1.0" ?>'."\n".$out->serialize(); |
|
144 | 144 | |
145 | 145 | begin_test('Data decoding (large array)', 'manual decoding'); |
146 | -for ($i = 0; $i < $num_tests; $i++) { |
|
146 | +for ($i = 0; $i<$num_tests; $i++) { |
|
147 | 147 | $response = $dummy->ParseResponse($in, true); |
148 | 148 | $value = $response->value(); |
149 | 149 | $result = array(); |
150 | - foreach($value as $val1) { |
|
150 | + foreach ($value as $val1) { |
|
151 | 151 | $out = array(); |
152 | - foreach($val1 as $name => $val) { |
|
152 | + foreach ($val1 as $name => $val) { |
|
153 | 153 | $out[$name] = array(); |
154 | - foreach($val as $data) { |
|
154 | + foreach ($val as $data) { |
|
155 | 155 | $out[$name][] = $data->scalarval(); |
156 | 156 | } |
157 | 157 | } |
@@ -161,18 +161,18 @@ discard block |
||
161 | 161 | end_test('Data decoding (large array)', 'manual decoding', $result); |
162 | 162 | |
163 | 163 | begin_test('Data decoding (large array)', 'manual decoding deprecated'); |
164 | -for ($i = 0; $i < $num_tests; $i++) { |
|
164 | +for ($i = 0; $i<$num_tests; $i++) { |
|
165 | 165 | $response = $dummy->ParseResponse($in, true); |
166 | 166 | $value = $response->value(); |
167 | 167 | $result = array(); |
168 | 168 | $l = $value->arraysize(); |
169 | - for ($k = 0; $k < $l; $k++) { |
|
169 | + for ($k = 0; $k<$l; $k++) { |
|
170 | 170 | $val1 = $value->arraymem($k); |
171 | 171 | $out = array(); |
172 | - foreach($val1 as $name => $val) { |
|
172 | + foreach ($val1 as $name => $val) { |
|
173 | 173 | $out[$name] = array(); |
174 | 174 | $m = $val->arraysize(); |
175 | - for ($j = 0; $j < $m; $j++) { |
|
175 | + for ($j = 0; $j<$m; $j++) { |
|
176 | 176 | $data = $val->arraymem($j); |
177 | 177 | $out[$name][] = $data->scalarval(); |
178 | 178 | } |
@@ -183,7 +183,7 @@ discard block |
||
183 | 183 | end_test('Data decoding (large array)', 'manual decoding deprecated', $result); |
184 | 184 | |
185 | 185 | begin_test('Data decoding (large array)', 'automatic decoding'); |
186 | -for ($i = 0; $i < $num_tests; $i++) { |
|
186 | +for ($i = 0; $i<$num_tests; $i++) { |
|
187 | 187 | $response = $dummy->ParseResponse($in, true, 'phpvals'); |
188 | 188 | $value = $response->value(); |
189 | 189 | } |
@@ -191,7 +191,7 @@ discard block |
||
191 | 191 | |
192 | 192 | if (function_exists('xmlrpc_decode')) { |
193 | 193 | begin_test('Data decoding (large array)', 'xmlrpc-epi decoding'); |
194 | - for ($i = 0; $i < $num_tests; $i++) { |
|
194 | + for ($i = 0; $i<$num_tests; $i++) { |
|
195 | 195 | $response = $dummy->ParseResponse($in, true, 'xml'); |
196 | 196 | $value = xmlrpc_decode($response->value()); |
197 | 197 | } |
@@ -207,15 +207,15 @@ discard block |
||
207 | 207 | $value = $encoder->encode($data1, array('auto_dates')); |
208 | 208 | $req = new Request('interopEchoTests.echoValue', array($value)); |
209 | 209 | $reqs = array(); |
210 | - for ($i = 0; $i < $num_tests; $i++) { |
|
210 | + for ($i = 0; $i<$num_tests; $i++) { |
|
211 | 211 | $reqs[] = $req; |
212 | 212 | } |
213 | 213 | $server = explode(':', $args['HTTPSERVER']); |
214 | - if (count($server) > 1) { |
|
215 | - $srv = $server[1] . '://' . $server[0] . $args['HTTPURI']; |
|
214 | + if (count($server)>1) { |
|
215 | + $srv = $server[1].'://'.$server[0].$args['HTTPURI']; |
|
216 | 216 | $c = new Client($args['HTTPURI'], $server[0], $server[1]); |
217 | 217 | } else { |
218 | - $srv = $args['HTTPSERVER'] . $args['HTTPURI']; |
|
218 | + $srv = $args['HTTPSERVER'].$args['HTTPURI']; |
|
219 | 219 | $c = new Client($args['HTTPURI'], $args['HTTPSERVER']); |
220 | 220 | } |
221 | 221 | // do not interfere with http compression |
@@ -229,7 +229,7 @@ discard block |
||
229 | 229 | } |
230 | 230 | begin_test($testName, 'http 10'); |
231 | 231 | $response = array(); |
232 | - for ($i = 0; $i < $num_tests; $i++) { |
|
232 | + for ($i = 0; $i<$num_tests; $i++) { |
|
233 | 233 | $resp = $c->send($req); |
234 | 234 | $response[] = $resp->value(); |
235 | 235 | } |
@@ -238,7 +238,7 @@ discard block |
||
238 | 238 | if (function_exists('curl_init')) { |
239 | 239 | begin_test($testName, 'http 11 w. keep-alive'); |
240 | 240 | $response = array(); |
241 | - for ($i = 0; $i < $num_tests; $i++) { |
|
241 | + for ($i = 0; $i<$num_tests; $i++) { |
|
242 | 242 | $resp = $c->send($req, 10, 'http11'); |
243 | 243 | $response[] = $resp->value(); |
244 | 244 | } |
@@ -247,7 +247,7 @@ discard block |
||
247 | 247 | $c->keepalive = false; |
248 | 248 | begin_test($testName, 'http 11'); |
249 | 249 | $response = array(); |
250 | - for ($i = 0; $i < $num_tests; $i++) { |
|
250 | + for ($i = 0; $i<$num_tests; $i++) { |
|
251 | 251 | $resp = $c->send($req, 10, 'http11'); |
252 | 252 | $response[] = $resp->value(); |
253 | 253 | } |
@@ -267,7 +267,7 @@ discard block |
||
267 | 267 | |
268 | 268 | begin_test($testName, 'http 10 w. compression'); |
269 | 269 | $response = array(); |
270 | - for ($i = 0; $i < $num_tests; $i++) { |
|
270 | + for ($i = 0; $i<$num_tests; $i++) { |
|
271 | 271 | $resp = $c->send($req); |
272 | 272 | $response[] = $resp->value(); |
273 | 273 | } |
@@ -276,7 +276,7 @@ discard block |
||
276 | 276 | if (function_exists('curl_init')) { |
277 | 277 | begin_test($testName, 'http 11 w. keep-alive and compression'); |
278 | 278 | $response = array(); |
279 | - for ($i = 0; $i < $num_tests; $i++) { |
|
279 | + for ($i = 0; $i<$num_tests; $i++) { |
|
280 | 280 | $resp = $c->send($req, 10, 'http11'); |
281 | 281 | $response[] = $resp->value(); |
282 | 282 | } |
@@ -285,7 +285,7 @@ discard block |
||
285 | 285 | $c->keepalive = false; |
286 | 286 | begin_test($testName, 'http 11 w. compression'); |
287 | 287 | $response = array(); |
288 | - for ($i = 0; $i < $num_tests; $i++) { |
|
288 | + for ($i = 0; $i<$num_tests; $i++) { |
|
289 | 289 | $resp = $c->send($req, 10, 'http11'); |
290 | 290 | $response[] = $resp->value(); |
291 | 291 | } |
@@ -306,7 +306,7 @@ discard block |
||
306 | 306 | foreach ($test_results as $test => $results) { |
307 | 307 | echo "\nTEST: $test\n"; |
308 | 308 | foreach ($results as $case => $data) { |
309 | - echo " $case: {$data['time']} secs - Output data CRC: " . crc32(serialize($data['result'])) . "\n"; |
|
309 | + echo " $case: {$data['time']} secs - Output data CRC: ".crc32(serialize($data['result']))."\n"; |
|
310 | 310 | } |
311 | 311 | } |
312 | 312 |
@@ -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"; |
@@ -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"; |