refactoring and bug fixes.
This commit is contained in:
@@ -1,15 +1,16 @@
|
||||
<?php namespace Laravel;
|
||||
|
||||
/**
|
||||
* Bootstrap the core framework components like the IoC container, configuration
|
||||
* class, and the class auto-loader. Once this file has run, the framework is
|
||||
* essentially ready for use.
|
||||
* Bootstrap the core framework components like the IoC container,
|
||||
* configuration class, and the class auto-loader. Once this file
|
||||
* has run, the framework is essentially ready for use.
|
||||
*/
|
||||
require 'bootstrap/core.php';
|
||||
|
||||
/**
|
||||
* Register the framework error handling methods and set the error_reporting levels.
|
||||
* This file will register handlers for exceptions, errors, and shutdown.
|
||||
* Register the framework error handling methods and set the
|
||||
* error_reporting levels. This file will register handlers
|
||||
* for exceptions, errors, and shutdown.
|
||||
*/
|
||||
require SYS_PATH.'bootstrap/errors'.EXT;
|
||||
|
||||
@@ -19,9 +20,9 @@ require SYS_PATH.'bootstrap/errors'.EXT;
|
||||
date_default_timezone_set(Config::get('application.timezone'));
|
||||
|
||||
/**
|
||||
* Load the session and session manager instance. The session payload will be
|
||||
* registered in the IoC container as an instance so it can be retrieved easily
|
||||
* throughout the application.
|
||||
* Load the session and session manager instance. The session
|
||||
* payload will be registered in the IoC container as an instance
|
||||
* so it can be retrieved easily throughout the application.
|
||||
*/
|
||||
if (Config::get('session.driver') !== '')
|
||||
{
|
||||
@@ -31,11 +32,18 @@ if (Config::get('session.driver') !== '')
|
||||
}
|
||||
|
||||
/**
|
||||
* Resolve the incoming request instance from the IoC container and route the
|
||||
* request to the proper route in the application. If a route is found, the route
|
||||
* will be called with the current requst instance. If no route is found, the 404
|
||||
* response will be returned to the browser.
|
||||
* Resolve the incoming request instance from the IoC container
|
||||
* and route the request to the proper route in the application.
|
||||
* If a route is found, the route will be called with the current
|
||||
* requst instance. If no route is found, the 404 response will
|
||||
* be returned to the browser.
|
||||
*/
|
||||
require SYS_PATH.'request'.EXT;
|
||||
require SYS_PATH.'routing/route'.EXT;
|
||||
require SYS_PATH.'routing/router'.EXT;
|
||||
require SYS_PATH.'routing/loader'.EXT;
|
||||
require SYS_PATH.'routing/caller'.EXT;
|
||||
|
||||
$request = $container->core('request');
|
||||
|
||||
list($method, $uri) = array($request->method(), $request->uri());
|
||||
@@ -52,16 +60,18 @@ else
|
||||
}
|
||||
|
||||
/**
|
||||
* Stringify the response. We need to force the response to be stringed before
|
||||
* closing the session, since the developer may be using the session within their
|
||||
* views, so we cannot age the session data until the view is rendered.
|
||||
* Stringify the response. We need to force the response to be
|
||||
* stringed before closing the session, since the developer may
|
||||
* be using the session within their views, so we cannot age
|
||||
* the session data until the view is rendered.
|
||||
*/
|
||||
$response->content = $response->render();
|
||||
|
||||
/**
|
||||
* Close the session and write the active payload to persistent storage. The input
|
||||
* for the current request is also flashed to the session so it will be available
|
||||
* for the next request via the Input::old method.
|
||||
* Close the session and write the active payload to persistent
|
||||
* storage. The input for the current request is also flashed
|
||||
* to the session so it will be available for the next request
|
||||
* via the Input::old method.
|
||||
*/
|
||||
if (isset($session))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user