X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=demo%2Fvardemo.php;h=d24d04ecc1f95a194234c080b4990c1f5cab77db;hb=7f511cb14b813295a06c5f4d82b1e2d9a27fb571;hp=0b542e74e3cfa8590eee35565bb90d44f3873d28;hpb=5b0b061574fa8458d5a92c24c20d077ad832cf63;p=plcapi.git diff --git a/demo/vardemo.php b/demo/vardemo.php index 0b542e7..d24d04e 100644 --- a/demo/vardemo.php +++ b/demo/vardemo.php @@ -2,47 +2,46 @@
" . htmlentities($v->serialize()) . ""; -$v = new xmlrpcval("What are you saying? >> << &&"); +$v = new PhpXmlRpc\Value("What are you saying? >> << &&"); print "
" . htmlentities($v->serialize()) . ""; -$v = new xmlrpcval(array( - new xmlrpcval("ABCDEFHIJ"), - new xmlrpcval(1234, 'int'), - new xmlrpcval(1, 'boolean'),), +$v = new PhpXmlRpc\Value(array( + new PhpXmlRpc\Value("ABCDEFHIJ"), + new PhpXmlRpc\Value(1234, 'int'), + new PhpXmlRpc\Value(1, 'boolean'),), "array" ); print "
" . htmlentities($v->serialize()) . ""; -$v = new xmlrpcval( +$v = new PhpXmlRpc\Value( array( - "thearray" => new xmlrpcval( + "thearray" => new PhpXmlRpc\Value( array( - new xmlrpcval("ABCDEFHIJ"), - new xmlrpcval(1234, 'int'), - new xmlrpcval(1, 'boolean'), - new xmlrpcval(0, 'boolean'), - new xmlrpcval(true, 'boolean'), - new xmlrpcval(false, 'boolean'), + new PhpXmlRpc\Value("ABCDEFHIJ"), + new PhpXmlRpc\Value(1234, 'int'), + new PhpXmlRpc\Value(1, 'boolean'), + new PhpXmlRpc\Value(0, 'boolean'), + new PhpXmlRpc\Value(true, 'boolean'), + new PhpXmlRpc\Value(false, 'boolean'), ), "array" ), - "theint" => new xmlrpcval(23, 'int'), - "thestring" => new xmlrpcval("foobarwhizz"), - "thestruct" => new xmlrpcval( + "theint" => new PhpXmlRpc\Value(23, 'int'), + "thestring" => new PhpXmlRpc\Value("foobarwhizz"), + "thestruct" => new PhpXmlRpc\Value( array( - "one" => new xmlrpcval(1, 'int'), - "two" => new xmlrpcval(2, 'int'), + "one" => new PhpXmlRpc\Value(1, 'int'), + "two" => new PhpXmlRpc\Value(2, 'int'), ), "struct" ), @@ -52,11 +51,11 @@ $v = new xmlrpcval( print "
" . htmlentities($v->serialize()) . ""; -$w = new xmlrpcval(array($v, new xmlrpcval("That was the struct!")), "array"); +$w = new PhpXmlRpc\Value(array($v, new PhpXmlRpc\Value("That was the struct!")), "array"); print "
" . htmlentities($w->serialize()) . ""; -$w = new xmlrpcval("Mary had a little lamb, +$w = new PhpXmlRpc\Value("Mary had a little lamb, Whose fleece was white as snow, And everywhere that Mary went the lamb was sure to go. @@ -69,25 +68,26 @@ And turned it into nylon", "base64" print "
" . htmlentities($w->serialize()) . ""; print "
Value of base64 string is: '" . $w->scalarval() . "'"; -$f->method(''); -$f->addParam(new xmlrpcval("41", "int")); +$req->method(''); +$req->addParam(new PhpXmlRpc\Value("41", "int")); print "
" . htmlentities($op) . ""; print "
\n"; $t = time(); -$date = iso8601_encode($t); +$date = PhpXmlRpc\Helper\Date::iso8601_encode($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::iso8601_encode($t, 1) . "\n"; +$tb = PhpXmlRpc\Helper\Date::iso8601_decode($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::iso8601_encode($tb) . "\n"; +print "Which was the time in UTC at " . PhpXmlRpc\Helper\Date::iso8601_decode($date, 1) . "\n"; print "\n"; + ?>