<?php
include_once 'autoload.inc.php';
$html = QTag::factory("html");
$head = QTag::factory("head");
$body = QTag::factory("body");
$title = QTag::factory("title")
->add("new template engine");
$script = QTag::factory("script")
->add("<!-- javascript -->");
$head ->add($title)
->add($script);
$html ->add($head);
$div = QTag::factory("div")->setAttribute("id","test");
$textarea = QTag::factory("textarea")
->setAttribute("id","ta")
->add("text für eine textarea");
$div->add($textarea);
$body->add($div);
$html->add($body);
print_r($html->doRender());
|