private function getRoute()
{
if (null === $this->request) {
return null;
}
$attributes = $this->request->attributes;
try {
$route = $this->router->generate($attributes->get('_route'), $attributes->get('_route_params'));
} catch (\InvalidArgumentException $e) {
return null;
}
return substr($route, strlen($this->request->getBasePath()) + 1);
}