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

@@ -17,7 +17,19 @@ class Session {
const csrf_token = 'csrf_token';
/**
* Create the session payload instance and load the session for the request.
* Create the session payload and the load the session.
*
* @return void
*/
public static function load()
{
static::start(Config::get('session.driver'));
static::$instance->load(Cookie::get(Config::get('session.cookie')));
}
/**
* Create the session payload instance for the request.
*
* @param string $driver
* @return void