示例#1
0
 public function saveInputValues(array $values = null)
 {
     if ($values === null) {
         $values = input()->all();
     }
     Session::set($this->_inputSessionKey, $values);
 }
示例#2
0
 public function clear($type = null)
 {
     if ($type !== null) {
         unset($this->messages[$type]);
         $this->save();
     } else {
         Session::destroy(self::KEY);
     }
 }
示例#3
0
 public static function start()
 {
     debug('Router initialised.');
     Session::start();
     if (app()->getDisableFrameworkRoutes() === false) {
         // Load framework specific controllers
         static::get(app()->getCssWrapRouteUrl(), 'ControllerWrap@css', ['namespace' => '\\Pecee\\Controller'])->setName(app()->getCssWrapRouteName());
         static::get(app()->getJsWrapRouteUrl(), 'ControllerWrap@js', ['namespace' => '\\Pecee\\Controller'])->setName(app()->getJsWrapRouteName());
     }
     // Load routes.php
     require_once $_ENV['base_path'] . 'app' . DIRECTORY_SEPARATOR . 'routes.php';
     parent::setDefaultNamespace('\\' . env('APP_NAME') . '\\Controller');
     parent::start();
     // Output debug info
     if (env('DEBUG', false) && app()->hasAdminIp() && isset($_GET['__debug']) && strtolower($_GET['__debug']) === 'true') {
         echo app()->debug;
     }
 }
示例#4
0
 public function validates()
 {
     return (bool) Session::exists($this->sessionName);
 }