$route->
setDefault('_controller',
$class->
getName());
} else { $route->
setDefault('_controller',
$class->
getName().'::'.
$method->
getName());
} } /**
* Makes the default route name more sane by removing common keywords.
*/
protected function getDefaultRouteName(\ReflectionClass
$class, \ReflectionMethod
$method): string
{ $name =
preg_replace('/(bundle|controller)_/', '_', parent::
getDefaultRouteName($class,
$method));
if (str_ends_with($method->name, 'Action'
) ||
str_ends_with($method->name, '_action'
)) { $name =
preg_replace('/action(_\d+)?$/', '\\1',
$name);
} return str_replace('__', '_',
$name);
}}