\QueryConnection_Manager

Connection manager class to manage connections for the Query method

Summary

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

Properties

$connections

$connections : array

Map of named database connections

Type

array

Methods

__clone()

__clone()

Private clone method to prevent cloning

Throws

\DomainException

__sleep()

__sleep()

Prevent serialization of this object

Throws

\DomainException

__wakeup()

__wakeup()

Make sure serialize/deserialize doesn't work

Throws

\DomainException

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(\stdClass $params) : \Query\Query_Builder

Parse the passed parameters and return a connection

Parameters

\stdClass $params

Returns

\Query\Query_Builder

parse_params()

parse_params(\stdClass $params) : array

Parses params into a dsn and option array

Parameters

\stdClass $params

Throws

\Query\BadDBDriverException

Returns

array

__construct()

__construct()

Private constructor to prevent multiple instances

create_dsn()

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

Create the dsn from the db type and params

Parameters

string $dbtype
\stdClass $params

Returns

string