summaryrefslogtreecommitdiff
path: root/src/SemanticScuttle/Service/Template.php
diff options
context:
space:
mode:
authorcweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f>2009-10-24 09:12:10 +0000
committercweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f>2009-10-24 09:12:10 +0000
commit9f53c3325c99c1602f570efdaf0b6e0df2944f95 (patch)
tree89aa64a2c4538ffda43d1f2c7c87f6e814b4d623 /src/SemanticScuttle/Service/Template.php
parent5d11ae2fd5a88b5605aa70167516a571822f0e06 (diff)
downloadsemanticscuttle-9f53c3325c99c1602f570efdaf0b6e0df2944f95.tar.gz
semanticscuttle-9f53c3325c99c1602f570efdaf0b6e0df2944f95.tar.bz2
convert tabs to spaces
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@407 b3834d28-1941-0410-a4f8-b48e95affb8f
Diffstat (limited to 'src/SemanticScuttle/Service/Template.php')
-rw-r--r--src/SemanticScuttle/Service/Template.php64
1 files changed, 32 insertions, 32 deletions
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 @@
<?php
class SemanticScuttle_Service_Template extends SemanticScuttle_Service
{
- protected $basedir;
+ protected $basedir;
/**
* Returns the single service instance
@@ -10,48 +10,48 @@ class SemanticScuttle_Service_Template extends SemanticScuttle_Service
*
* @return SemanticScuttle_Service
*/
- public static function getInstance($db)
+ public static function getInstance($db)
{
- static $instance;
- if (!isset($instance)) {
+ static $instance;
+ if (!isset($instance)) {
$instance = new self($db);
}
- return $instance;
- }
+ return $instance;
+ }
- public function __construct()
+ public function __construct()
{
- $this->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