Connection manager class to manage connections for the Query method

package Query
subpackage Core

 Methods

Parse the passed parameters and return a connection

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

Parameters

$params

\ArrayObject

Exceptions

\Query\BadConnectionException

Returns

Returns the connection specified by the name given

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

Parameters

$name

stringarrayobject

Exceptions

\Query\InvalidArgumentException

Returns

Return a connection manager instance

get_instance() : \Query\Connection_Manager
Static
staticvar null $instance

Returns

Private clone method to prevent cloning

__clone() 
codeCoverageIgnore

Private constructor to prevent multiple instances

__construct() 
codeCoverageIgnore

Make sure serialize/deseriaze doesn't work

__wakeup() 
codeCoverageIgnore

Exceptions

\Query\DomainException

Create the dsn from the db type and params

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

Parameters

$dbtype

string

$params

\ArrayObject

Returns

string

Parses params into a dsn and option array

parse_params(\ArrayObject $params) 

Parameters

$params

\ArrayObject

Exceptions

\Query\BadDBDriverException

 Properties

 

Map of named database connections

$connections : array

Default

array()
 

Class instance variable

$instance : \Query\Connection_Manager

Default

null
Static