DbBackends
in package
FinalYes
Provides a registry of database backends.
Table of Contents
Methods
- __construct() : mixed
- backend() : DbBackend
- Creates a database backend information class from a scheme.
- create() : DbConnection
- Creates a database connection from a DSN URI.
- parse() : DbConnectionInfo
- Parses a DSN URI into a connection info class.
- register() : void
- Registers a database backend with a protocol scheme.
Methods
__construct()
public
__construct() : mixed
Tags
backend()
Creates a database backend information class from a scheme.
public
static backend(string $scheme) : DbBackend
Parameters
- $scheme : string
-
Database protocol scheme.
Tags
Return values
DbBackend —Database backend information instance.
create()
Creates a database connection from a DSN URI.
public
static create(string $uri) : DbConnection
Parameters
- $uri : string
-
DSN URI.
Tags
Return values
DbConnection —Connection instance.
parse()
Parses a DSN URI into a connection info class.
public
static parse(string $uri) : DbConnectionInfo
Parameters
- $uri : string
-
DSN URI.
Return values
DbConnectionInfo —Connection info instance.
register()
Registers a database backend with a protocol scheme.
public
static register(string $scheme, string $className) : void
Parameters
- $scheme : string
-
URL scheme.
- $className : string
-
Fully qualified class name of the backend.