protected function getDatabaseConfig()
    {
        $config = Zend_Controller_Front::getInstance()->getParam('bootstrap');
        $resources = $config->getOption('resources');
        $dbConfig = [
            'driver'   => $resources['db']['adapter'],
            'hostname' => $resources['db']['params']['host'],
            'database' => $resources['db']['params']['dbname'],
            'username' => $resources['db']['params']['username'],
            'password' => $resources['db']['params']['password'],
            'charset'  => $resources['db']['params']['charset'],
            'dsn'      => sprintf('mysql:host=%s;dbname=%s', $resources['db']['params']['host'], $resources['db']['params']['dbname']),
        ];

        return $dbConfig;
    }
protected function getDatabaseConfig()
    {
        $config = Zend_Controller_Front::getInstance()->getParam('bootstrap');
        $resources = $config->getOption('resources');
        $dbConfig = [
            'driver'   => $resources['db']['adapter'],
            'hostname' => $resources['db']['params']['host'],
            'database' => $resources['db']['params']['dbname'],
            'username' => $resources['db']['params']['username'],
            'password' => $resources['db']['params']['password'],
            'charset'  => $resources['db']['params']['charset'],
            'dsn'      => sprintf('mysql:host=%s;dbname=%s', $resources['db']['params']['host'], $resources['db']['params']['dbname']),
        ];

        return $dbConfig;
    }
protected function getDatabaseConfig ( ) { $ config = Zend_Controller_Front :: getInstance ( ) -> getParam ( 'bootstrap' ) ; $ resources = $ config -> getOption ( 'resources' ) ; $ dbConfig = [ 'driver' => $ resources [ 'db' ] [ 'adapter' ] , 'hostname' => $ resources [ 'db' ] [ 'params' ] [ 'host' ] , 'database' => $ resources [ 'db' ] [ 'params' ] [ 'dbname' ] , 'username' => $ resources [ 'db' ] [ 'params' ] [ 'username' ] , 'password' => $ resources [ 'db' ] [ 'params' ] [ 'password' ] , 'charset' => $ resources [ 'db' ] [ 'params' ] [ 'charset' ] , 'dsn' => sprintf ( 'mysql:host=%s;dbname=%s' , $ resources [ 'db' ] [ 'params' ] [ 'host' ] , $ resources [ 'db' ] [ 'params' ] [ 'dbname' ] ) , ] ; return $ dbConfig ; }
Get the current database config, including a DSN

@return array
Get the current database config including a DSN