/** * @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; }
public function redirectRoute($routeName, $statusCode = 302, array $headers = []) { $route = RouteMatch::getRoute($routeName); $uri = $route->getPath(); return $this->redirect($uri, $statusCode, $headers); }