ILIAS
trunk Revision v11.0_alpha-2638-g80c1d007f79
◀ ilDoc Overview
class.ilDBWrapperFactory.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
32
class
ilDBWrapperFactory
33
{
39
public
static
function
getWrapper
(
string
$a_type): \
ilDBPdoInterface
40
{
41
$ilDB
= match ($a_type) {
42
'pdo-mysql-innodb'
,
ilDBConstants::TYPE_INNODB
=>
new
ilDBPdoMySQLInnoDB
(),
43
ilDBConstants::TYPE_GALERA
=>
new
ilDBPdoMySQLGalera
(),
44
default
=>
throw
new
ilDatabaseException
(
"No viable database-type given: "
. var_export($a_type,
true
)),
45
};
46
47
return
$ilDB
;
48
}
49
}
ilDBPdoInterface
Interface ilDBPdoInterface.
Definition:
interface.ilDBPdoInterface.php:24
ilDBConstants\TYPE_GALERA
const TYPE_GALERA
Definition:
class.ilDBConstants.php:35
ilDBWrapperFactory\getWrapper
static getWrapper(string $a_type)
Definition:
class.ilDBWrapperFactory.php:39
ilDatabaseException
$ilDB
$ilDB
Definition:
storeScorm2004.php:25
ilDBConstants\TYPE_INNODB
const TYPE_INNODB
Definition:
class.ilDBConstants.php:32
ilDBWrapperFactory
Class ilDBWrapperFactory.
Definition:
class.ilDBWrapperFactory.php:32
ilDBPdoMySQLInnoDB
Class ilDBPdoMySQLInnoDB.
Definition:
class.ilDBPdoMySQLInnoDB.php:25
ilDBPdoMySQLGalera
Class ilDBPdoMySQLInnoDB.
Definition:
class.ilDBPdoMySQLGalera.php:25
components
ILIAS
Database
classes
class.ilDBWrapperFactory.php
Generated on Sun Aug 31 2025 23:02:46 for ILIAS by
1.8.13 (using
Doxyfile
)