diff --git a/bootstrap.php b/bootstrap.php index dbaef54..2c9f5fd 100644 --- a/bootstrap.php +++ b/bootstrap.php @@ -92,16 +92,6 @@ static function init() { Library::init(); Library::beginNamedRun('recess'); - Library::import('recess.framework.Application'); - foreach(self::$applications as $key => $app) { - if(!Library::classExists($app)) { - die('Application "' . $app . '" does not exist. Remove it from recess-conf.php, RecessConf::$applications array.'); - } else { - $app = Library::getClassName($app); - self::$applications[$key] = new $app; - } - } - Library::import('recess.database.Databases'); Library::import('recess.database.orm.ModelDataSource'); @@ -150,6 +140,16 @@ static function init() { Databases::addSource($name, new ModelDataSource($sourceInfo)); } } + + Library::import('recess.framework.Application'); + foreach(self::$applications as $key => $app) { + if(!Library::classExists($app)) { + die('Application "' . $app . '" does not exist. Remove it from recess-conf.php, RecessConf::$applications array.'); + } else { + $app = Library::getClassName($app); + self::$applications[$key] = new $app; + } + } Library::import('recess.framework.DefaultPolicy'); self::$policy = new DefaultPolicy();