summaryrefslogtreecommitdiff
path: root/src/SemanticScuttle/Service/Cache.php
diff options
context:
space:
mode:
authorcweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f>2009-10-03 21:52:30 +0000
committercweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f>2009-10-03 21:52:30 +0000
commitd5f09b7e4d802cdc2d5f3f876c48ea918c961488 (patch)
treeaa1eb37219c17bef03b1515e5074b4743f89a9a3 /src/SemanticScuttle/Service/Cache.php
parentb7345f833dea849e94f2ce23fdbe6ab58ba98be3 (diff)
downloadsemanticscuttle-d5f09b7e4d802cdc2d5f3f876c48ea918c961488.tar.gz
semanticscuttle-d5f09b7e4d802cdc2d5f3f876c48ea918c961488.tar.bz2
make the application work again
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@388 b3834d28-1941-0410-a4f8-b48e95affb8f
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'];
}