setCurrentRoute() 공개 메소드

Set the current route instance.
public setCurrentRoute ( Route $route ) : void
$route Route
리턴 void
예제 #1
0
 /**
  * Refresh the request stack by resetting the authentication,
  * popping the last request from the stack, replacing the
  * input, and resetting the version and parameters.
  *
  * @return void
  */
 protected function refreshRequestStack()
 {
     if (!$this->persistAuthenticatedUser) {
         $this->auth->setUser(null);
         $this->persistAuthenticatedUser = true;
     }
     if ($route = array_pop($this->routeStack)) {
         $this->router->setCurrentRoute($route);
     }
     $this->replaceRequestInput();
     $this->version = null;
     $this->parameters = $this->files = [];
 }
예제 #2
0
파일: Dispatcher.php 프로젝트: jieke360/api
 /**
  * Refresh the request stack.
  *
  * This is done by resetting the authentication, popping
  * the last request from the stack, replacing the input,
  * and resetting the version and parameters.
  *
  * @return void
  */
 protected function refreshRequestStack()
 {
     if (!$this->persistAuthentication) {
         $this->auth->setUser(null);
         $this->persistAuthentication = true;
     }
     if ($route = array_pop($this->routeStack)) {
         $this->router->setCurrentRoute($route);
     }
     $this->replaceRequestInstance();
     $this->clearCachedFacadeInstance();
     $this->raw = false;
     $this->version = $this->domain = $this->content = null;
     $this->parameters = $this->uploads = [];
 }