- Added tests suite for haanga-cli.php
[haanga.git] / examples / inheritance.php
blob673ff2ca8db101fdcebfc5f6ebc1b3340e3704fe
1 <?php
2 /**
3 * Simple example rendering a user list
4 * ------------------------------------
5 *
6 * @credit - adapt from ptemplates sample
7 */
8 require "../lib/runtime.php";
10 Haanga::setCacheDir('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/>";