# \QueryConnectionManager

Connection manager class to manage connections for the Query method

## Summary

Methods
Properties
Constants
__clone()
__sleep()
__wakeup()
getInstance()
getConnection()
connect()
parseParams()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
__construct()
createDsn()
$connections
$instance
N/A
final

File
  Query/ConnectionManager.php
Package
  Default
Class hierarchy
  \Query\ConnectionManager

## Tags

None found

## Properties

### $connections

    $connections : array

Map of named database connections

#### Type

array

#

## Tags

None found

### $instance

    $instance : \Query\ConnectionManager

Class instance variable

#### Type

\Query\ConnectionManager

#

## Tags

None found

## Methods

### __clone()

    __clone() : void

Private clone method to prevent cloning

#### Throws

\DomainException

#

## Tags

None found

### __sleep()

    __sleep() : void

Prevent serialization of this object

#### Throws

\DomainException

#

## Tags

None found

### __wakeup()

    __wakeup() : void

Make sure serialize/deserialize doesn't work

#### Throws

\DomainException

#

## Tags

None found

### getInstance()

    getInstance() : \Query\ConnectionManager

Return a connection manager instance

#### Returns

\Query\ConnectionManager

#

static

## Tags

staticvar | null $instance

### getConnection()

    getConnection(string|array|object  $name = '') : \Query\QueryBuilderInterface

Returns the connection specified by the name given

#### Parameters

string|array|object | $name |

#### Throws

\InvalidArgumentException

#### Returns

\Query\QueryBuilderInterface

#

## Tags

None found

### connect()

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

Parse the passed parameters and return a connection

#### Parameters

\stdClass | $params |

#### Returns

\Query\QueryBuilderInterface

#

## Tags

None found

### parseParams()

    parseParams(\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 |

### createDsn()

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

Create the dsn from the db type and params

#### Parameters

string | $dbtype |
\stdClass | $params |

#### Returns

string

#

## Tags

None found

### ConnectionManager.php