summaryrefslogtreecommitdiff
path: root/src/SemanticScuttle/Service/Cache.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/SemanticScuttle/Service/Cache.php')
-rw-r--r--src/SemanticScuttle/Service/Cache.php29
1 files changed, 19 insertions, 10 deletions
diff --git a/src/SemanticScuttle/Service/Cache.php b/src/SemanticScuttle/Service/Cache.php
index fe66d38..5ca2843 100644
--- a/src/SemanticScuttle/Service/Cache.php
+++ b/src/SemanticScuttle/Service/Cache.php
@@ -1,18 +1,27 @@
<?php
-class CacheService {
+class SemanticScuttle_Service_Cache extends SemanticScuttle_Service
+{
var $basedir;
var $fileextension = '.cache';
- function &getInstance() {
- static $instance;
-
- if (!isset($instance))
- $instance =& new CacheService();
-
- return $instance;
- }
+ /**
+ * 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 self($db);
+ }
+ return $instance;
+ }
- function CacheService() {
+ protected function __construct()
+ {
$this->basedir = $GLOBALS['dir_cache'];
}