aboutsummaryrefslogtreecommitdiff
path: root/src/SemanticScuttle/Service/Tag.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/SemanticScuttle/Service/Tag.php')
-rw-r--r--src/SemanticScuttle/Service/Tag.php24
1 files changed, 17 insertions, 7 deletions
diff --git a/src/SemanticScuttle/Service/Tag.php b/src/SemanticScuttle/Service/Tag.php
index fc44a99..2a70948 100644
--- a/src/SemanticScuttle/Service/Tag.php
+++ b/src/SemanticScuttle/Service/Tag.php
@@ -1,17 +1,27 @@
<?php
-class TagService {
- var $db;
+class SemanticScuttle_Service_Tag extends SemanticScuttle_Service
+{
var $tablename;
- function &getInstance(&$db) {
+ /**
+ * 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 TagService($db);
+ if (!isset($instance)) {
+ $instance = new self($db);
+ }
return $instance;
}
- function TagService(&$db) {
- $this->db =& $db;
+ public function __construct($db)
+ {
+ $this->db = $db;
$this->tablename = $GLOBALS['tableprefix'] .'tags';
}