ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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 global $DIC;
28 $ilClientIniFile = null;
29 if ($DIC != null && $DIC->offsetExists('ilClientIniFile')) {
33 $ilClientIniFile = $DIC['ilClientIniFile'];
34 }
35
36 if ($a_type == "" && $ilClientIniFile instanceof ilIniFile) {
37 $a_type = $ilClientIniFile->readVariable("db", "type");
38 }
39 if ($a_type == "") {
41 }
42
43 switch ($a_type) {
47 break;
51 break;
55 break;
58 break;
59 default:
60 throw new ilDatabaseException("No viable database-type given: " . var_export($a_type, true));
61 }
62
63 return $ilDB;
64 }
65}
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 $DIC
Definition: saml.php:7
global $ilDB
$a_type
Definition: workflow.php:92