Skip to content

Commit

Permalink
Switching initialization of DB's and applications so that in applicat…
Browse files Browse the repository at this point in the history
…ion construct DB's will be available for any sort of application logic that wants to be initiated.
  • Loading branch information
msumme authored and KrisJordan committed Nov 1, 2010
1 parent e735495 commit d7fe8fc
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit d7fe8fc

Please sign in to comment.