summaryrefslogtreecommitdiff
path: root/src/SemanticScuttle/Service/Template.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/SemanticScuttle/Service/Template.php')
-rw-r--r--src/SemanticScuttle/Service/Template.php23
1 files changed, 17 insertions, 6 deletions
diff --git a/src/SemanticScuttle/Service/Template.php b/src/SemanticScuttle/Service/Template.php
index 05e494c..dbe5670 100644
--- a/src/SemanticScuttle/Service/Template.php
+++ b/src/SemanticScuttle/Service/Template.php
@@ -1,15 +1,26 @@
<?php
-class TemplateService {
- var $basedir;
+class SemanticScuttle_Service_Template extends SemanticScuttle_Service
+{
+ protected $basedir;
- function &getInstance() {
+ /**
+ * Returns the single service instance
+ *
+ * @param DB $db Database object
+ *
+ * @return SemanticScuttle_Service
+ */
+ public static function getInstance($db)
+ {
static $instance;
- if (!isset($instance))
- $instance =& new TemplateService();
+ if (!isset($instance)) {
+ $instance = new self($db);
+ }
return $instance;
}
- function TemplateService() {
+ public function __construct()
+ {
$this->basedir = $GLOBALS['TEMPLATES_DIR'];
}