diff options
author | cweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f> | 2009-10-03 21:52:30 +0000 |
---|---|---|
committer | cweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f> | 2009-10-03 21:52:30 +0000 |
commit | d5f09b7e4d802cdc2d5f3f876c48ea918c961488 (patch) | |
tree | aa1eb37219c17bef03b1515e5074b4743f89a9a3 /src/SemanticScuttle/Service.php | |
parent | b7345f833dea849e94f2ce23fdbe6ab58ba98be3 (diff) | |
download | semanticscuttle-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.php')
-rw-r--r-- | src/SemanticScuttle/Service.php | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/SemanticScuttle/Service.php b/src/SemanticScuttle/Service.php new file mode 100644 index 0000000..a537262 --- /dev/null +++ b/src/SemanticScuttle/Service.php @@ -0,0 +1,35 @@ +<?php +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 self($db); + } + return $instance; + } + +} +?>
\ No newline at end of file |