summaryrefslogtreecommitdiff
path: root/src/SemanticScuttle/Service/servicefactory.php
diff options
context:
space:
mode:
authorcweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f>2009-10-03 14:08:25 +0000
committercweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f>2009-10-03 14:08:25 +0000
commitb7345f833dea849e94f2ce23fdbe6ab58ba98be3 (patch)
treeb6b6d73910e69621824e0fb46bcaa81d08607052 /src/SemanticScuttle/Service/servicefactory.php
parent29422fa55379aa61a61019b832c83dab6d450264 (diff)
downloadsemanticscuttle-b7345f833dea849e94f2ce23fdbe6ab58ba98be3.tar.gz
semanticscuttle-b7345f833dea849e94f2ce23fdbe6ab58ba98be3.tar.bz2
more file renamings
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@387 b3834d28-1941-0410-a4f8-b48e95affb8f
Diffstat (limited to 'src/SemanticScuttle/Service/servicefactory.php')
-rw-r--r--src/SemanticScuttle/Service/servicefactory.php38
1 files changed, 0 insertions, 38 deletions
diff --git a/src/SemanticScuttle/Service/servicefactory.php b/src/SemanticScuttle/Service/servicefactory.php
deleted file mode 100644
index b5215e3..0000000
--- a/src/SemanticScuttle/Service/servicefactory.php
+++ /dev/null
@@ -1,38 +0,0 @@
-<?php
-/* Connect to the database and build services */
-
-class ServiceFactory {
- function ServiceFactory(&$db, $serviceoverrules = array()) {
- }
-
- function &getServiceInstance($name, $servicedir = NULL) {
- global $dbhost, $dbuser, $dbpass, $dbname, $dbport, $dbpersist, $dbtype;
- static $instances = array();
- static $db;
- if (!isset($db)) {
- require_once(dirname(__FILE__) .'/../includes/db/'. $dbtype .'.php');
- $db = new sql_db();
- $db->sql_connect($dbhost, $dbuser, $dbpass, $dbname, $dbport, $dbpersist);
- if(!$db->db_connect_id) {
- message_die(CRITICAL_ERROR, "Could not connect to the database", $db);
- }
- $db->sql_query("SET NAMES UTF8");
- }
-
- if (!isset($instances[$name])) {
- if (isset($serviceoverrules[$name])) {
- $name = $serviceoverrules[$name];
- }
- if (!class_exists($name)) {
- if (!isset($servicedir)) {
- $servicedir = dirname(__FILE__) .'/';
- }
-
- require_once($servicedir . strtolower($name) . '.php');
- }
- $instances[$name] = call_user_func(array($name, 'getInstance'), $db);
- }
- return $instances[$name];
- }
-}
-?>