public function getConnection($connName = null)
{
$connName = $connName ?: $this->defaultConnection;
// Check if DBAL Connection has not yet been initialized
if (!isset($this->connections[$connName])) {
// Check if DBAL Connection is configured
if (!isset($this->configuration['dbal'][$connName])) {
throw new Exception\NameNotFoundException("Unable to find Doctrine DBAL Connection '{$connName}'.");
}
$this->connections[$connName] = $this->startDBALConnection($this->configuration['dbal'][$connName]);
unset($this->configuration['dbal'][$connName]);
}
return $this->connections[$connName];
}