Example #1
0
 private function getEntityManager()
 {
     $paths = array(Conf::getRootDir() . Conf::getDcotrineMappingsPath());
     $isDevMode = true;
     // the connection configuration
     $dbParams = array('driver' => Conf::getDBDriver(), 'user' => Conf::getDBUser(), 'password' => Conf::getDBPassword(), 'dbname' => Conf::getDBName(), 'host' => Conf::getDBHost(), 'port' => Conf::getDBPort());
     $configDoctrine = Setup::createXMLMetadataConfiguration($paths, $isDevMode);
     return EntityManager::create($dbParams, $configDoctrine);
 }