# \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
final

File
  src/Query/Connection_Manager.php
Package
  Query\Core
Class hierarchy
  \Query\Connection_Manager

## Tags

None found

## Properties

### $connections

    $connections : array

Map of named database connections

#### Type

array

#

## Tags

None found

### $instance

    $instance : \Query\Connection_Manager

Class instance variable

#### Type

\Query\Connection_Manager

#

## Tags

None found

## Methods

### __clone()

    __clone()

Private clone method to prevent cloning

#### Throws

\DomainException

#

## Tags

None found

### __sleep()

    __sleep()

Prevent serialization of this object

#### Throws

\DomainException

#

## Tags

None found

### __wakeup()

    __wakeup()

Make sure serialize/deserialize doesn't work

#### Throws

\DomainException

#

## Tags

None found

### get_instance()

    get_instance() : \Query\Connection_Manager

Return a connection manager instance

#### Returns

\Query\Connection_Manager

#

static

## Tags

staticvar | null $instance

### 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

#

## Tags

None found

### connect()

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

Parse the passed parameters and return a connection

#### Parameters

\stdClass | $params |

#### Returns

\Query\Query_Builder

#

## Tags

None found

### parse_params()

    parse_params(\stdClass  $params) : array

Parses params into a dsn and option array

#### Parameters

\stdClass | $params |

#### Throws

\Query\BadDBDriverException

#### Returns

array

#

## Tags

None found

### __construct()

    __construct()

Private constructor to prevent multiple instances

#

## Tags

codeCoverageIgnore |

### 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

#

## Tags

None found

### Connection_Manager.php