ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilDBWrapperFactory Class Reference

Class ilDBWrapperFactory. More...

+ Collaboration diagram for ilDBWrapperFactory:

Static Public Member Functions

static getWrapper (string $a_type)
 

Detailed Description

Class ilDBWrapperFactory.

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
Fabian Schmid fs@st.nosp@m.uder.nosp@m.-raim.nosp@m.ann..nosp@m.ch

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

Member Function Documentation

◆ getWrapper()

static ilDBWrapperFactory::getWrapper ( string  $a_type)
static
Parameters
string$a_type
Returns
ilDBPdoInterface
Exceptions
ilDatabaseException

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

40 {
41 $ilDB = match ($a_type) {
42 'pdo-mysql-innodb', ilDBConstants::TYPE_INNODB => new ilDBPdoMySQLInnoDB(),
44 default => throw new ilDatabaseException("No viable database-type given: " . var_export($a_type, true)),
45 };
46
47 return $ilDB;
48 }
Class ilDBPdoMySQLInnoDB.
Class ilDBPdoMySQLInnoDB.
Class ilDatabaseException.
Interface ilDBPdoInterface.

References $ilDB, ilDBConstants\TYPE_GALERA, and ilDBConstants\TYPE_INNODB.

Referenced by ilDatabaseCreatedObjective\achieve(), ilDatabaseExistsObjective\achieve(), ilDatabaseInitializedObjective\achieve(), ilDatabaseServerIsConnectableObjective\achieve(), ilSoapInstallationInfoXMLWriter\buildClient(), ilInitialisation\initDatabase(), and ilDatabaseCreatedObjective\isApplicable().

+ Here is the caller graph for this function:

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