Example #1
0
 public function run(Request &$request)
 {
     Log::point(__METHOD__);
     Sokol::checkAccess($this);
     $controller = Sokol::setController(HttpKernel::getController($request));
     return $controller->run($request);
 }
Example #2
0
 public function run(Request &$request)
 {
     $this->before_run($request);
     Log::point(__METHOD__);
     $this->getRoutes($request);
     $session = Sokol::getSession();
     $user_id = $session->get('user_id');
     if ($user_id) {
         Sokol::setUser($user_id);
     }
     if (Sokol::getUser() != NULL || $request->get('_component') == 'main') {
         Sokol::setCom(HttpKernel::getComponent($request));
         //создаем объект компонента
         $res = Sokol::getCom()->run($request);
         //получаем результаты выволнения компонента
         $this->after_run($res);
         return $res;
     } else {
         return new RedirectResponse(BASE_URL);
     }
 }
Example #3
0
 public function after_run($res)
 {
     Log::point(__METHOD__);
 }