X-Git-Url: https://git.llucax.com/software/bife/bife-all.git/blobdiff_plain/2ca13aad316873633c3fd9ba59ee2f5579d90272..32c4af54172ab70146bee5addc9b0786dd727c80:/examples/hit.php?ds=sidebyside diff --git a/examples/hit.php b/examples/hit.php index 9dae06d..f9ec397 100644 --- a/examples/hit.php +++ b/examples/hit.php @@ -29,7 +29,7 @@ // 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'); @@ -37,14 +37,18 @@ require_once 'HTML/Template/HIT.php'; $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!!!', + ) +); ?>