Connection manager class to manage connections for the Query method

package Query
subpackage Query

 Methods

Parse the passed parameters and return a connection

connect(array|object $params) : \Query_Builder

Parameters

$params

arrayobject

Exceptions

\BadConnectionException

Returns

Returns the connection specified by the name given

get_connection(mixed $name = '') : \Query_Builder

Parameters

$name

mixed

Exceptions

\InvalidArgumentException

Returns

Return a connection manager instance

get_instance() : \Connection_Manager
Static
staticvar null $instance

Returns

__clone()

__clone() 

Private methods for singleton

__construct() 

Make sure serialize/deseriaze doesn't work

__wakup() 

Exceptions

\DomainException

Create the dsn from the db type and params

create_dsn(string $dbtype, array|object $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

\BadDBDriverException

 Properties

 

Map of named database connections

$connections : array

Default

array()
 

Class instance variable

$instance : \Connection_Manager

Default

null
Static