From 9f53c3325c99c1602f570efdaf0b6e0df2944f95 Mon Sep 17 00:00:00 2001 From: cweiske Date: Sat, 24 Oct 2009 09:12:10 +0000 Subject: convert tabs to spaces git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@407 b3834d28-1941-0410-a4f8-b48e95affb8f --- src/SemanticScuttle/Service/Template.php | 64 ++++++++++++++++---------------- 1 file changed, 32 insertions(+), 32 deletions(-) (limited to 'src/SemanticScuttle/Service/Template.php') diff --git a/src/SemanticScuttle/Service/Template.php b/src/SemanticScuttle/Service/Template.php index dbe5670..110c5cf 100644 --- a/src/SemanticScuttle/Service/Template.php +++ b/src/SemanticScuttle/Service/Template.php @@ -1,7 +1,7 @@ basedir = $GLOBALS['TEMPLATES_DIR']; - } + $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; - } + 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; + var $vars = array(); + var $file = ''; + var $templateservice; - function Template($file, $vars = NULL, &$templateservice) { - $this->vars = $vars; - $this->file = $file; - $this->templateservice = $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 parse() { + if (isset($this->vars)) + extract($this->vars); + include($this->file); + } - function includeTemplate($name) { - return $this->templateservice->loadTemplate($name, $this->vars); - } + function includeTemplate($name) { + return $this->templateservice->loadTemplate($name, $this->vars); + } } ?> \ No newline at end of file -- cgit v1.2.3