final class PlatformFactory

Factory for creating platform-specific implementations.

Constants§

public const DRIVER_MYSQL = 'mysql'

PDO driver name for MySQL.

public const DRIVER_SQLITE = 'sqlite'

PDO driver name for SQLite.

public const DRIVER_PGSQL = 'pgsql'

PDO driver name for PostgreSQL.

Methods§

public static function detectDriver(PDO $pdo): string

Detect the driver name from a PDO connection.

Parameters

$pdoPDO

Returns

string

Throws

DriverDetectionException If the connection does not report a driver name
UnsupportedDriverException If the reported driver is not supported
Test cases 2
Called from 1
Calls 8
public static function getSupportedDrivers(): list<string>

Get the list of supported drivers.

Returns

list<string>
Test cases 1
Calls 3

Test cases 28§

Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.

Dedicated tests 12
Other tests reaching this symbol 16

Relations§

Static calls 9
Constant reads 2