Definitions of the main configuration of the direct database connection system. The configuration includes a list of database connections and specifies which connection is the default.

Method Overview

Method Meaning of
public getConnections(
): Db_Backend_Config[]
Returns the definition of all (configured) database connections.
public getConnection(
string $connection_name
): Db_Backend_Config|null
Returns the definition of a specific database connection (specified by its name). If no such connection exists, then it returns null.
public addConnection(
Db_Backend_Config $connection_configuration
): void
Adds a new connection definition to the configuration.
public deleteConnection(
string $connection_name
): void
Removes the connection definition from the configuration.
public getDefaultConnectionName(
): string
Returns the name of the default connection.
public setDefaultConnectionName(
string $default_connection_name
): void
Sets the name of the default connection.
public static getConnectionsList(
string $driver_type_filter = ''
): array
Returns a list of connections. Not definitions, but only connection names.
  • $driver_type_filter
    Allows you to limit the result to a specific database type. For example, you can get a list of all connections to MariaDB/MySQL and ignore the others.
Previous chapter
Next chapter