getOptions()); Zend_Registry::set('config', $c); // Database - Zend Style $db = Zend_Db::factory($c->profil->db->metier); Zend_Db_Table_Abstract::setDefaultAdapter($db); // Database - Doctrine Style $config = new \Doctrine\DBAL\Configuration(); $connectionParams = array( 'dbname' => $c->profil->db->metier->params->dbname, 'user' => $c->profil->db->metier->params->username, 'password' => $c->profil->db->metier->params->password, 'host' => $c->profil->db->metier->params->host, 'charset' => 'utf8', 'driver' => 'pdo_mysql', ); try { $conn = \Doctrine\DBAL\DriverManager::getConnection($connectionParams, $config); Zend_Registry::set('doctrine', $conn); } catch (\Doctrine\DBAL\DBALException $e) { echo "Connection Database impossible.\n"; exit; }