public function getConnection(string $connectionName): \PDO
    {
        if (!isset($this->connections[$connectionName])) {
            throw new DatabaseException(sprintf('Connection (%s) not found in pool.', $connectionName));
        }
        return $this->connections[$connectionName];
    }
public function getConnection(string $connectionName): \PDO
    {
        if (!isset($this->connections[$connectionName])) {
            throw new DatabaseException(sprintf('Connection (%s) not found in pool.', $connectionName));
        }
        return $this->connections[$connectionName];
    }
public function getConnection ( string $ connectionName ) : \ PDO { if ( ! isset ( $ this -> connections [ $ connectionName ] ) ) { throw new DatabaseException ( sprintf ( 'Connection (%s) not found in pool.' , $ connectionName ) ) ; } return $ this -> connections [ $ connectionName ] ; }
Retrieves a database connection.

@param string $connectionName
@return \PDO
@throws DatabaseException
Retrieves a database connection .