ILIAS  trunk Revision v12.0_alpha-1227-g7ff6d300864
ilDBWrapperFactory.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
23
37{
43 public static function getWrapper(string $a_type): \ilDBPdoInterface
44 {
45 $ilDB = new ilDBPdo(match ($a_type) {
46 'pdo-mysql-innodb', ilDBConstants::TYPE_INNODB => new InnoDBDetails(),
48 default => throw new ilDatabaseException("No viable database-type given: " . var_export($a_type, true)),
49 });
50
51 return $ilDB;
52 }
53}
Class ilDBWrapperFactory.
static getWrapper(string $a_type)
Class ilDatabaseException.
Interface ilDBPdoInterface.