private function _buildConnection(Dsn $dsn)
    {
        if (isset($this->_drivers[$dsn->scheme])) {
            $driver = $this->_drivers[$dsn->scheme];

            return is_string($driver)
                ? new $driver($dsn) : call_user_func($driver, $dsn);
        }

        // check built in drivers
        switch ($dsn->scheme) {
            case 'mysql':
            case 'mysqli':
                return new Mysqli\Connection($dsn);
        }

        throw new \Pheasant\Exception("Unknown driver $driver");
    }
private function _buildConnection(Dsn $dsn)
    {
        if (isset($this->_drivers[$dsn->scheme])) {
            $driver = $this->_drivers[$dsn->scheme];

            return is_string($driver)
                ? new $driver($dsn) : call_user_func($driver, $dsn);
        }

        // check built in drivers
        switch ($dsn->scheme) {
            case 'mysql':
            case 'mysqli':
                return new Mysqli\Connection($dsn);
        }

        throw new \Pheasant\Exception("Unknown driver $driver");
    }
private function _buildConnection ( Dsn $ dsn ) { if ( isset ( $ this -> _drivers [ $ dsn -> scheme ] ) ) { $ driver = $ this -> _drivers [ $ dsn -> scheme ] ; return is_string ( $ driver ) ? new $ driver ( $ dsn ) : call_user_func ( $ driver , $ dsn ) ; } // check built in drivers switch ( $ dsn -> scheme ) { case 'mysql' : case 'mysqli' : return new Mysqli \ Connection ( $ dsn ) ; } throw new \ Pheasant \ Exception ( "Unknown driver $driver" ) ; }
Builds a connection object for a given Dsn
@return Connection
Builds a connection object for a given Dsn