IDbBackend
in
Information about a database layer. Should not have any external dependencies.
Table of Contents
Methods
- createConnection() : IDbConnection
- Creates a connection with the database described in the argument.
- isAvailable() : bool
- Checks whether the driver is available and a connection can be made.
- parseDsn() : IDbConnectionInfo
- Constructs a connection info instance from a dsn.
Methods
createConnection()
Creates a connection with the database described in the argument.
public
createConnection(IDbConnectionInfo $connectionInfo) : IDbConnection
Parameters
- $connectionInfo : IDbConnectionInfo
-
Object that describes the desired connection.
Tags
Return values
IDbConnection —A connection described in the connection info.
isAvailable()
Checks whether the driver is available and a connection can be made.
public
isAvailable() : bool
Return values
bool —If true a connection can be made, if false a required extension is missing.
parseDsn()
Constructs a connection info instance from a dsn.
public
parseDsn(string|array<string|int, mixed> $dsn) : IDbConnectionInfo
Parameters
- $dsn : string|array<string|int, mixed>
-
DSN with connection information.
Return values
IDbConnectionInfo —Connection info based on the dsn.