Diff for phpPlatonLib/templateSystems/ObjTemplate/test/Attic/test.php between version 1.2 and 1.3
| version 1.2, 2001/11/04 19:55:20 |
version 1.3, 2001/11/13 00:12:45 |
| Line 13 function print_array($a, $prefix = '') { |
|
| Line 13 function print_array($a, $prefix = '') { |
|
| |
|
| include_once("../ObjTemplate.class.php"); |
include_once("../ObjTemplate.class.php"); |
| |
|
| $tmpl = new ObjTemplate("test.tmpl"); |
$tmpl = new ObjTemplate("test2.tmpl"); |
| |
|
| echo "<h3>template array print</h3>"; |
echo "<h3>template array print</h3>"; |
| |
|
|
|
| echo "<hr><h3>is_key() test</h3>"; |
echo "<hr><h3>is_key() test</h3>"; |
| |
|
| print 'is_key("subtemplate"): ' . ($tmpl->is_key("subtemplate") == true ? "true" : "false"); |
print 'is_key("subtemplate"): ' . ($tmpl->is_key("subtemplate") == true ? "true" : "false"); |
| |
print "<br>"; |
| |
|
| |
print 'is_key("level2"): ' . ($tmpl->is_key("level2") == true ? "true" : "false"); |
| |
print "<br>"; |
| |
|
| echo "<hr><h3>add_before(), add_after() and set() test</h3>"; |
echo "<hr><h3>add_before(), add_after() and set() test</h3>"; |
| |
|
| Line 33 $tmpl->add_after("AFTER"); |
|
| Line 37 $tmpl->add_after("AFTER"); |
|
| $tmpl->set(array( |
$tmpl->set(array( |
| "xxx" => "KOFOLAAAAAA", |
"xxx" => "KOFOLAAAAAA", |
| 'yyy' => 'PIVO!', |
'yyy' => 'PIVO!', |
| |
'level' => '3', |
| |
'level2' => 'a', |
| 'subtemplate' => "aaa%subtemplatex%aa", |
'subtemplate' => "aaa%subtemplatex%aa", |
| 'subtemplatex' => "XXXXXXXXXX" |
'subtemplatex' => "XXXXXXXXXX" |
| )); |
)); |
Platon Group <platon@platon.org> http://platon.org/
|
|