\QueryConnection_Manager

Connection manager class to manage connections for the Query method

Summary

Methods
Properties
Constants
get_instance()
get_connection()
connect()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
__construct()
__clone()
__wakeup()
parse_params()
create_dsn()
$connections
$instance
N/A

Properties

$connections

$connections : array

Map of named database connections

Type

array

Methods

get_instance()

get_instance() : \Query\Connection_Manager

Return a connection manager instance

Returns

\Query\Connection_Manager

get_connection()

get_connection(string|array|object $name) : \Query\Query_Builder

Returns the connection specified by the name given

Parameters

string|array|object $name

Throws

\InvalidArgumentException

Returns

\Query\Query_Builder

connect()

connect(\ArrayObject $params) : \Query\Query_Builder

Parse the passed parameters and return a connection

Parameters

\ArrayObject $params

Returns

\Query\Query_Builder

__construct()

__construct()

Private constructor to prevent multiple instances

__clone()

__clone()

Private clone method to prevent cloning

__wakeup()

__wakeup()

Make sure serialize/deserialize doesn't work

Throws

\DomainException

parse_params()

parse_params(\ArrayObject $params) : array

Parses params into a dsn and option array

Parameters

\ArrayObject $params

Throws

\Query\BadDBDriverException

Returns

array

create_dsn()

create_dsn(string $dbtype, \ArrayObject $params) : string

Create the dsn from the db type and params

Parameters

string $dbtype
\ArrayObject $params

Returns

string