diff options
author | cweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f> | 2009-10-03 14:00:33 +0000 |
---|---|---|
committer | cweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f> | 2009-10-03 14:00:33 +0000 |
commit | 29422fa55379aa61a61019b832c83dab6d450264 (patch) | |
tree | e5884ce6fed2cf1d02165a1b5667b99cd80262e5 /services/templateservice.php | |
parent | b8b1d06b2d899658fae64d0de506439ca0ea067c (diff) | |
download | semanticscuttle-29422fa55379aa61a61019b832c83dab6d450264.tar.gz semanticscuttle-29422fa55379aa61a61019b832c83dab6d450264.tar.bz2 |
move files to new locations
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@386 b3834d28-1941-0410-a4f8-b48e95affb8f
Diffstat (limited to 'services/templateservice.php')
-rw-r--r-- | services/templateservice.php | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/services/templateservice.php b/services/templateservice.php deleted file mode 100644 index 05e494c..0000000 --- a/services/templateservice.php +++ /dev/null @@ -1,46 +0,0 @@ -<?php -class TemplateService { - var $basedir; - - function &getInstance() { - static $instance; - if (!isset($instance)) - $instance =& new TemplateService(); - return $instance; - } - - function TemplateService() { - $this->basedir = $GLOBALS['TEMPLATES_DIR']; - } - - function loadTemplate($template, $vars = NULL) { - if (substr($template, -4) != '.php') - $template .= '.php'; - $tpl =& new Template($this->basedir .'/'. $template, $vars, $this); - $tpl->parse(); - return $tpl; - } -} - -class Template { - var $vars = array(); - var $file = ''; - var $templateservice; - - function Template($file, $vars = NULL, &$templateservice) { - $this->vars = $vars; - $this->file = $file; - $this->templateservice = $templateservice; - } - - function parse() { - if (isset($this->vars)) - extract($this->vars); - include($this->file); - } - - function includeTemplate($name) { - return $this->templateservice->loadTemplate($name, $this->vars); - } -} -?>
\ No newline at end of file |