src/Database.php
public static function initialize() {
		$paths = array_merge(
			array_filter(glob('src/*'), 'is_dir'),
			array_filter(glob('src-*/*'), 'is_dir'),
			array_filter(glob(__DIR__ . '/../../*/src/*/'), 'is_dir')
		);

		$db_params = array(
			"url" => Configuration::get("database.uri", "sqlite:///:memory:")
		);

		$cache = null;
		if(Configuration::get("database.cache", "false") == "false")
			$cache = new \Doctrine\Common\Cache\ArrayCache;

		$config = Setup::createAnnotationMetadataConfiguration($paths, Configuration::get("debug.database", "false") == "true", "cache", $cache);

		foreach(Modules::getAll() as $module)
			$config->addEntityNamespace($module->getShortName(), $module->getNamespace() . "\\Models");

		self::$entity_manager = EntityManager::create($db_params, $config);
	}
public static function initialize() {
		$paths = array_merge(
			array_filter(glob('src/*'), 'is_dir'),
			array_filter(glob('src-*/*'), 'is_dir'),
			array_filter(glob(__DIR__ . '/../../*/src/*/'), 'is_dir')
		);

		$db_params = array(
			"url" => Configuration::get("database.uri", "sqlite:///:memory:")
		);

		$cache = null;
		if(Configuration::get("database.cache", "false") == "false")
			$cache = new \Doctrine\Common\Cache\ArrayCache;

		$config = Setup::createAnnotationMetadataConfiguration($paths, Configuration::get("debug.database", "false") == "true", "cache", $cache);

		foreach(Modules::getAll() as $module)
			$config->addEntityNamespace($module->getShortName(), $module->getNamespace() . "\\Models");

		self::$entity_manager = EntityManager::create($db_params, $config);
	}
public static function initialize ( ) { $ paths = array_merge ( array_filter ( glob ( 'src/*' ) , 'is_dir' ) , array_filter ( glob ( 'src-*/*' ) , 'is_dir' ) , array_filter ( glob ( __DIR__ . '/../../*/src/*/' ) , 'is_dir' ) ) ; $ db_params = array ( "url" => Configuration :: get ( "database.uri" , "sqlite:///:memory:" ) ) ; $ cache = null ; if ( Configuration :: get ( "database.cache" , "false" ) == "false" ) $ cache = new \ Doctrine \ Common \ Cache \ ArrayCache ; $ config = Setup :: createAnnotationMetadataConfiguration ( $ paths , Configuration :: get ( "debug.database" , "false" ) == "true" , "cache" , $ cache ) ; foreach ( Modules :: getAll ( ) as $ module ) $ config -> addEntityNamespace ( $ module -> getShortName ( ) , $ module -> getNamespace ( ) . "\\Models" ) ; self :: $ entity_manager = EntityManager :: create ( $ db_params , $ config ) ; }
Initialize the Doctrine database engine.

This will connect to the database uri specified in the configuration.
If the database uri cannot be found, an in-memory sqlite instance will be used.

@return null
Initialize the Doctrine database engine .