aboutsummaryrefslogtreecommitdiff
path: root/lib/PhpTemplate.php
diff options
context:
space:
mode:
authorMaZderMind2014-11-09 20:28:50 +0100
committerMaZderMind2014-11-09 20:28:50 +0100
commitb5cd8aa32cf2e9c83ec457fbb0a235cdec8e37cd (patch)
tree5efcab448905e9af7441239a1ecbfd3cf6869c85 /lib/PhpTemplate.php
parent21cb56374ff92578e447e8aadafb1aba2d56e5e0 (diff)
move init-code into bootstrap-file
Diffstat (limited to 'lib/PhpTemplate.php')
-rw-r--r--lib/PhpTemplate.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/PhpTemplate.php b/lib/PhpTemplate.php
index 8dd6f72..4fc4dfe 100644
--- a/lib/PhpTemplate.php
+++ b/lib/PhpTemplate.php
@@ -12,14 +12,21 @@ if(!function_exists('h'))
class PhpTemplate
{
+ private $data = array();
+
public function __construct($file)
{
$this -> file = $file;
}
+ public function set($___data = array())
+ {
+ $this->data = array_merge($this->data, $___data);
+ }
+
public function render($___data = array())
{
- extract((array)$___data);
+ extract(array_merge($this->data, $___data));
unset($___data);
ob_start();