public function convertDbConfig($db)
    {
        $connectionOptions = [];

        if ($db['dbdriver'] === 'pdo') {
            return $this->convertDbConfigPdo($db);
        } elseif ($db['dbdriver'] === 'mysqli') {
            $connectionOptions = [
                'driver'   => $db['dbdriver'],
                'user'     => $db['username'],
                'password' => $db['password'],
                'host'     => $db['hostname'],
                'dbname'   => $db['database'],
                'charset'  => $db['char_set'],
            ];
        } else {
            throw new Exception('Your Database Configuration is not confirmed by CodeIgniter Doctrine');
        }

        return $connectionOptions;
    }
public function convertDbConfig($db)
    {
        $connectionOptions = [];

        if ($db['dbdriver'] === 'pdo') {
            return $this->convertDbConfigPdo($db);
        } elseif ($db['dbdriver'] === 'mysqli') {
            $connectionOptions = [
                'driver'   => $db['dbdriver'],
                'user'     => $db['username'],
                'password' => $db['password'],
                'host'     => $db['hostname'],
                'dbname'   => $db['database'],
                'charset'  => $db['char_set'],
            ];
        } else {
            throw new Exception('Your Database Configuration is not confirmed by CodeIgniter Doctrine');
        }

        return $connectionOptions;
    }
public function convertDbConfig ( $ db ) { $ connectionOptions = [ ] ; if ( $ db [ 'dbdriver' ] === 'pdo' ) { return $ this -> convertDbConfigPdo ( $ db ) ; } elseif ( $ db [ 'dbdriver' ] === 'mysqli' ) { $ connectionOptions = [ 'driver' => $ db [ 'dbdriver' ] , 'user' => $ db [ 'username' ] , 'password' => $ db [ 'password' ] , 'host' => $ db [ 'hostname' ] , 'dbname' => $ db [ 'database' ] , 'charset' => $ db [ 'char_set' ] , ] ; } else { throw new Exception ( 'Your Database Configuration is not confirmed by CodeIgniter Doctrine' ) ; } return $ connectionOptions ; }
Convert CodeIgniter database config array to Doctrine's

See http://www.codeigniter.com/user_guide/database/configuration.html
See http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html

@param array $db
@return array
@throws Exception
Convert CodeIgniter database config array to Doctrine s