aboutsummaryrefslogtreecommitdiff
path: root/src/SemanticScuttle/Service.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/SemanticScuttle/Service.php')
-rw-r--r--src/SemanticScuttle/Service.php60
1 files changed, 60 insertions, 0 deletions
diff --git a/src/SemanticScuttle/Service.php b/src/SemanticScuttle/Service.php
new file mode 100644
index 0000000..cd79f2c
--- /dev/null
+++ b/src/SemanticScuttle/Service.php
@@ -0,0 +1,60 @@
+<?php
+/**
+ * SemanticScuttle - your social bookmark manager.
+ *
+ * PHP version 5.
+ *
+ * @category Bookmarking
+ * @package SemanticScuttle
+ * @author Benjamin Huynh-Kim-Bang <mensonge@users.sourceforge.net>
+ * @author Christian Weiske <cweiske@cweiske.de>
+ * @author Eric Dane <ericdane@users.sourceforge.net>
+ * @license GPL http://www.gnu.org/licenses/gpl.html
+ * @link http://sourceforge.net/projects/semanticscuttle
+ */
+
+/**
+ * SemanticScuttle base service class.
+ *
+ * @category Bookmarking
+ * @package SemanticScuttle
+ * @author Benjamin Huynh-Kim-Bang <mensonge@users.sourceforge.net>
+ * @author Christian Weiske <cweiske@cweiske.de>
+ * @author Eric Dane <ericdane@users.sourceforge.net>
+ * @license GPL http://www.gnu.org/licenses/gpl.html
+ * @link http://sourceforge.net/projects/semanticscuttle
+ */
+class SemanticScuttle_Service
+{
+ /**
+ * SQL database object
+ *
+ * @var sql_db
+ */
+ protected $db;
+
+
+
+ /**
+ * Returns the single service instance
+ *
+ * @internal
+ * This function can be used once PHP 5.3 is minimum, because only
+ * 5.3 supports late static binding. For all lower php versions,
+ * we still need a copy of this method in each service class.
+ *
+ * @param DB $db Database object
+ *
+ * @return SemanticScuttle_Service
+ */
+ public static function getInstance($db)
+ {
+ static $instance;
+ if (!isset($instance)) {
+ $instance = new static($db);
+ }
+ return $instance;
+ }
+
+}
+?> \ No newline at end of file