Index Documentation

DbBackend
in

Information about a database layer. Should not have any external dependencies.

Table of Contents

Methods

createConnection()  : DbConnection
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()  : DbConnectionInfo
Constructs a connection info instance from a dsn.

Methods

createConnection()

Creates a connection with the database described in the argument.

public createConnection(DbConnectionInfo $connectionInfo) : DbConnection
Parameters
$connectionInfo : DbConnectionInfo

Object that describes the desired connection.

Tags
throws
InvalidArgumentException

An invalid implementation of DbConnectionInfo was provided.

Return values
DbConnection

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|string> $dsn) : DbConnectionInfo
Parameters
$dsn : string|array<string, int|string>

DSN with connection information.

Return values
DbConnectionInfo

Connection info based on the dsn.


        
On this page

Search results