ILIAS  trunk Revision v11.0_alpha-1761-g6dbbfa7b760
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
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.

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

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

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  }
Interface ilDBPdoInterface.
Class ilDBPdoMySQLInnoDB.
Class ilDBPdoMySQLInnoDB.
+ Here is the caller graph for this function:

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