/** * 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'))); }
* * If error detail is turned off, we will turn off all PHP error * reporting and display since the framework will be displaying a * generic message and we don't want any sensitive details about * the exception leaking into the views. */ error_reporting(-1); ini_set('display_errors', 'Off'); /** * 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::$items['session']['driver'] !== '') { $driver = Session\Drivers\Factory::make(Config::$items['session']['driver']); $session = new Session\Payload($driver); $session->load(Cookie::get(Config::$items['session']['cookie'])); IoC::instance('laravel.session', $session); } /** * Gather the input to the application based on the current request. * The input will be gathered based on the current request method and * will be set on the Input manager. */ $input = array(); switch (Request::method()) { case 'GET': $input = $_GET; break; case 'POST': $input = $_POST;