How to get the config variables in Zend Framework

$config = new Zend_Config_Ini(
APPLICATION_PATH . '/configs/application.ini',
'production'
);

$config->resources->db->params->dbname;
$config->resources->db->params->username;