X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=demo%2Fvardemo.php;h=3c9812a660924bcb41ae1b7271c19da4f69015b5;hb=37782a719db2fbe02fe3462edcb06e89f6d58aac;hp=4f91deb18d0992ec198efd1f0da69e628f29b7df;hpb=3f49519b2d8157ac9da42bcf5836bf94020de485;p=plcapi.git diff --git a/demo/vardemo.php b/demo/vardemo.php index 4f91deb..3c9812a 100644 --- a/demo/vardemo.php +++ b/demo/vardemo.php @@ -2,11 +2,10 @@ xmlrpc Testing value serialization\n"; @@ -15,10 +14,12 @@ print "
" . htmlentities($v->serialize()) . "
"; $v = new PhpXmlRpc\Value("What are you saying? >> << &&"); print "
" . htmlentities($v->serialize()) . "
"; -$v = new PhpXmlRpc\Value(array( - new PhpXmlRpc\Value("ABCDEFHIJ"), - new PhpXmlRpc\Value(1234, 'int'), - new PhpXmlRpc\Value(1, 'boolean'),), +$v = new PhpXmlRpc\Value( + array( + new PhpXmlRpc\Value("ABCDEFHIJ"), + new PhpXmlRpc\Value(1234, 'int'), + new PhpXmlRpc\Value(1, 'boolean'), + ), "array" ); @@ -69,25 +70,26 @@ And turned it into nylon", "base64" print "
" . htmlentities($w->serialize()) . "
"; print "
Value of base64 string is: '" . $w->scalarval() . "'
"; -$f->method(''); -$f->addParam(new PhpXmlRpc\Value("41", "int")); +$req->method(''); +$req->addParam(new PhpXmlRpc\Value("41", "int")); print "

Testing request serialization

\n"; -$op = $f->serialize(); +$op = $req->serialize(); print "
" . htmlentities($op) . "
"; print "

Testing ISO date format

\n";
 
 $t = time();
-$date = iso8601_encode($t);
+$date = PhpXmlRpc\Helper\Date::iso8601Encode($t);
 print "Now is $t --> $date\n";
-print "Or in UTC, that is " . iso8601_encode($t, 1) . "\n";
-$tb = iso8601_decode($date);
+print "Or in UTC, that is " . PhpXmlRpc\Helper\Date::iso8601Encode($t, 1) . "\n";
+$tb = PhpXmlRpc\Helper\Date::iso8601Decode($date);
 print "That is to say $date --> $tb\n";
-print "Which comes out at " . iso8601_encode($tb) . "\n";
-print "Which was the time in UTC at " . iso8601_decode($date, 1) . "\n";
+print "Which comes out at " . PhpXmlRpc\Helper\Date::iso8601Encode($tb) . "\n";
+print "Which was the time in UTC at " . PhpXmlRpc\Helper\Date::iso8601Encode($date, 1) . "\n";
 
 print "
\n"; + ?>