$GLOBALS['db_type'], 'user' => $GLOBALS['db_username'], 'password' => $GLOBALS['db_password'], 'host' => $GLOBALS['db_host'], 'database' => $GLOBALS['db_name'] ); } else { $params = array( 'driver' => 'pdo_sqlite', 'memory' => true ); } return Doctrine_DBAL_DriverManager::getConnection($params); } }