Allowing for config.load event.

Moved more basic logic into application start to make it easier to hook into early life cycle events such as configuration loading while not introducing extra files into the framework.

Signed-off-by: Taylor Otwell <taylorotwell@gmail.com>
This commit is contained in:
Taylor Otwell
2012-03-01 10:55:37 -06:00
parent 871d205a35
commit be95496158
6 changed files with 118 additions and 60 deletions

View File

@@ -50,8 +50,6 @@ register_shutdown_function(function()
*/
error_reporting(-1);
ini_set('display_errors', Config::get('error.display'));
/**
* Even though "Magic Quotes" are deprecated in PHP 5.3, they may
* still be enabled on the server. To account for this, we will
@@ -68,18 +66,6 @@ if (magic_quotes())
}
}
/**
* Load the session using the session manager. The payload will
* be set on a static property of the Session class for easy
* access throughout the framework and application.
*/
if (Config::get('session.driver') !== '')
{
Session::start(Config::get('session.driver'));
Session::load(Cookie::get(Config::get('session.cookie')));
}
/**
* Gather the input to the application based on the global input
* variables for the current request. The input will be gathered