summaryrefslogtreecommitdiffstatshomepage
path: root/src/SemanticScuttle/Service/templateservice.php
diff options
context:
space:
mode:
authorGravatar cweiske2009-10-03 14:08:25 +0000
committerGravatar cweiske2009-10-03 14:08:25 +0000
commitb7345f833dea849e94f2ce23fdbe6ab58ba98be3 (patch)
treeb6b6d73910e69621824e0fb46bcaa81d08607052 /src/SemanticScuttle/Service/templateservice.php
parent29422fa55379aa61a61019b832c83dab6d450264 (diff)
downloadscuttle-b7345f833dea849e94f2ce23fdbe6ab58ba98be3.tar.gz
scuttle-b7345f833dea849e94f2ce23fdbe6ab58ba98be3.zip
more file renamings
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@387 b3834d28-1941-0410-a4f8-b48e95affb8f
Diffstat (limited to 'src/SemanticScuttle/Service/templateservice.php')
-rw-r--r--src/SemanticScuttle/Service/templateservice.php46
1 files changed, 0 insertions, 46 deletions
diff --git a/src/SemanticScuttle/Service/templateservice.php b/src/SemanticScuttle/Service/templateservice.php
deleted file mode 100644
index 05e494c..0000000
--- a/src/SemanticScuttle/Service/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