database refactoring.

This commit is contained in:
Taylor Otwell
2011-08-01 17:58:20 -05:00
parent 829088f3d1
commit badc8a6088
11 changed files with 544 additions and 536 deletions

View File

@@ -8,6 +8,8 @@
* @link http://laravel.com
*/
$t = microtime(true);
// --------------------------------------------------------------
// The path to the application directory.
// --------------------------------------------------------------
@@ -135,6 +137,16 @@ if (System\Config::get('session.driver') != '')
System\Session::load(System\Cookie::get('laravel_session'));
}
// --------------------------------------------------------------
// Load all of the core routing classes.
// --------------------------------------------------------------
require SYS_PATH.'request'.EXT;
require SYS_PATH.'response'.EXT;
require SYS_PATH.'routing/route'.EXT;
require SYS_PATH.'routing/router'.EXT;
require SYS_PATH.'routing/loader'.EXT;
require SYS_PATH.'routing/filter'.EXT;
// --------------------------------------------------------------
// Register the route filters.
// --------------------------------------------------------------
@@ -150,7 +162,7 @@ $response = System\Routing\Filter::call('before', array(), true);
// ----------------------------------------------------------
if (is_null($response))
{
$route = System\Routing\Router::make(Request::method(), Request::uri(), new System\Routing\Loader)->route();
$route = System\Routing\Router::make(System\Request::method(), System\Request::uri(), new System\Routing\Loader(APP_PATH))->route();
$response = (is_null($route)) ? System\Response::error('404') : $route->call();
}