// This is a simple test and example of HTML_Template_HIT
$tmp = ini_get('include_path');
-ini_set('include_path', "../src:$tmp");
+ini_set('include_path', "../core:$tmp");
unset($tmp);
umask('002');
$hit =& new HTML_Template_HIT('hooks');
-$rows = '';
for ($i = 0; $i < 20; $i++) {
- $cells = '';
for ($j = 0; $j < 20; $j++) {
- $cells .= $hit->parse('cell', array('CELL' => "$i,$j"));
+ $hit->parseBuffered('cell', 'CELL', "$i,$j");
}
- $rows .= $hit->parse('row', array('ROW' => $cells, 'CACA' => 'fea'));
+ $hit->parseBuffered('row', 'ROW', $hit->popBuffer('cell'));
}
-echo $hit->parse('body', array('ROWS' => $rows, 'TITLE' => 'HOLA MUNDO!!!'));
+echo $hit->parse(
+ 'body',
+ array(
+ 'ROWS' => $hit->popBuffer('row'),
+ 'TITLE' => 'HOLA MUNDO!!!',
+ )
+);
?>