55 lines
939 B
Plaintext
55 lines
939 B
Plaintext
|
|
|
|
RENDER()
|
|
{
|
|
DTree t;
|
|
|
|
<>
|
|
<link rel="stylesheet" href='style.css'></link>
|
|
<h1>
|
|
<a href="index.uce">UCE Test</a>:
|
|
DTree
|
|
</h1>
|
|
|
|
Value Types:
|
|
|
|
<pre><?
|
|
|
|
t.set("string test");
|
|
echo(string("string test: ") + t.to_string()+"\n");
|
|
|
|
t.set(true);
|
|
echo(string("bool test: ") + t.to_string()+"\n");
|
|
|
|
t.set(1234.5678);
|
|
echo(string("float test: ") + t.to_string()+"\n");
|
|
|
|
t.set(&t);
|
|
echo(string("pointer test: ") + t.to_string()+"\n");
|
|
|
|
?></pre>
|
|
|
|
Tree:
|
|
|
|
<pre><?
|
|
|
|
t.key("a")->set("valueA");
|
|
t.key("b")->set("valueB");
|
|
t.key("c")->key("c-d")->set("valueCD");
|
|
t.key("c")->key("c-e")->set("valueCE");
|
|
t.key("c")->key("c-f")->set(&t);
|
|
t.key("g")->key("g-h")->key("h-i")->set("valueHI");
|
|
t["g"]["x"]["y1"] = "XYZ1";
|
|
t["g"]["x"]["y2"] = &t;
|
|
t["g"]["x"]["y3"] = time();
|
|
t["g"]["x"]["y4"] = "Ünicödä";
|
|
echo(var_dump(t));
|
|
|
|
?></pre>
|
|
|
|
Params
|
|
<pre><?= var_dump(context->params) ?></pre>
|
|
</>
|
|
|
|
}
|