- Added tests, tags and filters
[haanga.git] / examples / inheritance.php
blob1e3b436da075fd78473b28b8b08e708f0234406b
1 <?php
2 /**
3 * Simple example rendering a user list
4 * ------------------------------------
5 *
6 * @credit - adapt from ptemplates sample
7 */
8 require "../haanga/runtime.php";
10 Haanga::setCacheDir('inheritance/tmp/');
11 Haanga::setTEmplateDir('inheritance/');
13 $time_start = microtime(true);
15 Haanga::Load('page.html', array(
16 'title' => microtime(TRUE),
17 'users' => array(
18 array(
19 'username' => 'peter',
20 'tasks' => array('school', 'writing'),
21 'user_id' => 1,
23 array(
24 'username' => 'anton',
25 'tasks' => array('go shopping'),
26 'user_id' => 2,
28 array(
29 'username' => 'john doe',
30 'tasks' => array('write report', 'call tony', 'meeting with arron'),
31 'user_id' => 3
33 array(
34 'username' => 'foobar',
35 'tasks' => array(),
36 'user_id' => 4
39 ));
41 echo "in ".(microtime(true) - $time_start)." seconds\n<br/>";