Ejemplo n.º 1
0
 /**
  * @return SymfonyRoute
  */
 public function getRoute()
 {
     if (!is_null($this->Route)) {
         return $this->Route;
     }
     if (is_null($this->parameters)) {
         return null;
     }
     if (isset($this->parameters['_route'])) {
         return $this->Route = RouteMatch::getRoute($this->parameters['_route']);
     }
     return null;
 }
Ejemplo n.º 2
0
 public function redirectRoute($routeName, $statusCode = 302, array $headers = [])
 {
     $route = RouteMatch::getRoute($routeName);
     $uri = $route->getPath();
     return $this->redirect($uri, $statusCode, $headers);
 }