final class PdoDsnResolver (View source)

Derives a PDO DSN from explicit configuration while preserving an explicitly supplied DSN.

Methods

static string

Returns an explicit DSN or constructs the supported MySQL fallback from normalized connection settings.

string
static bool

Indicates whether the resolved DSN selects the MySQL PDO driver.

bool
static bool

Indicates whether the resolved DSN selects the SQLite PDO driver.

bool

Details

resolve

static string resolve(DatabaseConfig $config)

Returns an explicit DSN or constructs the supported MySQL fallback from normalized connection settings.

Parameters

DatabaseConfig $config

Return Value

string

Exceptions

DatabaseException

isMysql

static bool isMysql(DatabaseConfig $config)

Indicates whether the resolved DSN selects the MySQL PDO driver.

Parameters

DatabaseConfig $config

Return Value

bool

isSqlite

static bool isSqlite(DatabaseConfig $config)

Indicates whether the resolved DSN selects the SQLite PDO driver.

Parameters

DatabaseConfig $config

Return Value

bool