src/Db/DbHelper.php
public static function getConnection($dsn)
    {
        if (!is_array($dsn)) {
            $dsn = self::parseDsn($dsn);
        }
        if (!isset($dsn['adapter'])) {
            throw new Exception("database adapter is missing for " . json_encode($dsn));
        }
        $class = 'Phalcon\Db\Adapter\Pdo\\' . ucfirst($dsn['adapter']);
        $conn = new $class($dsn);
        return Mixin::create($conn, new self);
    }
public static function getConnection($dsn)
    {
        if (!is_array($dsn)) {
            $dsn = self::parseDsn($dsn);
        }
        if (!isset($dsn['adapter'])) {
            throw new Exception("database adapter is missing for " . json_encode($dsn));
        }
        $class = 'Phalcon\Db\Adapter\Pdo\\' . ucfirst($dsn['adapter']);
        $conn = new $class($dsn);
        return Mixin::create($conn, new self);
    }
public static function getConnection ( $ dsn ) { if ( ! is_array ( $ dsn ) ) { $ dsn = self :: parseDsn ( $ dsn ) ; } if ( ! isset ( $ dsn [ 'adapter' ] ) ) { throw new Exception ( "database adapter is missing for " . json_encode ( $ dsn ) ) ; } $ class = 'Phalcon\Db\Adapter\Pdo\\' . ucfirst ( $ dsn [ 'adapter' ] ) ; $ conn = new $ class ( $ dsn ) ; return Mixin :: create ( $ conn , new self ) ; }
creates database connect by dsn

@param string $dsn
@return DbAdapter
creates database connect by dsn