ILIAS  Release_4_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilDBWrapperFactory Class Reference

DB Wrapper Factory. More...

+ Collaboration diagram for ilDBWrapperFactory:

Static Public Member Functions

static getWrapper ($a_type)

Detailed Description

DB Wrapper Factory.

Delivers a DB wrapper object depending on given DB type and DSN.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
Id:
class.ilDB.php 18989 2009-02-15 12:57:19Z akill

Definition at line 15 of file class.ilDBWrapperFactory.php.

Member Function Documentation

static ilDBWrapperFactory::getWrapper (   $a_type)
static

Definition at line 17 of file class.ilDBWrapperFactory.php.

References $ilDB.

Referenced by ilSoapAuthenticationCAS\__buildAuth(), ilBaseAuthentication\__buildDSN(), ilClient\connect(), ilSoapAdministration\getClientInfo(), and ilInitialisation\initDatabase().

{
global $ilClientIniFile;
if ($a_type == "" && is_object($ilClientIniFile))
{
$a_type = $ilClientIniFile->readVariable("db","type");
}
if ($a_type == "")
{
$a_type = "mysql";
}
switch ($a_type)
{
case "mysql":
include_once("./Services/Database/classes/class.ilDBMySQL.php");
$ilDB = new ilDBMySQL();
break;
case "oracle":
include_once("./Services/Database/classes/class.ilDBOracle.php");
$ilDB = new ilDBOracle();
break;
}
return $ilDB;
}

+ Here is the caller graph for this function:


The documentation for this class was generated from the following file: