summaryrefslogtreecommitdiff
path: root/stupid_template_engine.php
diff options
context:
space:
mode:
Diffstat (limited to 'stupid_template_engine.php')
-rw-r--r--stupid_template_engine.php10
1 files changed, 7 insertions, 3 deletions
diff --git a/stupid_template_engine.php b/stupid_template_engine.php
index 78a3eec..58b327d 100644
--- a/stupid_template_engine.php
+++ b/stupid_template_engine.php
@@ -38,14 +38,18 @@ class TextNode extends ASTNode
class TagNode extends ASTNode
{
public $name;
- public $params;
- public $sub;
+ public $params = array();
+ public $sub = array();
+ public function __construct($tpl, $off, $name = "") {
+ parent::__construct($tpl, $off);
+ $this->name = $name;
+ }
}
class VariableNode extends ASTNode
{
public $name;
- public $arrayfields;
+ public $arrayfields = array();
public function transcompile()
{
$varaccess = '@$ste->vars[' . (is_numeric($this->name) ? $this->name : '"' . escape_text($this->name) . '"'). ']';