ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
class.ilDBWrapperFactory.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3
17{
18
25 public static function getWrapper($a_type)
26 {
27 if ($a_type == "") {
28 if (isset($GLOBALS["DIC"])
29 && $GLOBALS["DIC"]->offsetExists("ilClientIniFile")
30 && $GLOBALS["DIC"]["ilClientIniFile"] instanceof \ilIniFile) {
31 $a_type = $GLOBALS["DIC"]["ilClientIniFile"]->readVariable("db", "type");
32 } else {
34 }
35 }
36
37 switch ($a_type) {
41 break;
45 break;
49 break;
52 break;
53 default:
54 throw new ilDatabaseException("No viable database-type given: " . var_export($a_type, true));
55 }
56
57 return $ilDB;
58 }
59}
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64
An exception for terminatinating execution or to throw for unit testing.
Class ilDBPdoMySQLInnoDB.
Class ilDBPdoMySQLInnoDB.
Class ilDBPdoMySQLMyISAM.
Class ilDBPdoPostgreSQL.
Class ilDBWrapperFactory.
Class ilDatabaseException.
INIFile Parser.
global $ilDB
$a_type
Definition: workflow.php:92