Symfony\Component\Routing\Loader\AnnotationClassLoader::getDefaultRouteName PHP Method

getDefaultRouteName() protected method

protected getDefaultRouteName ( ReflectionClass $class, ReflectionMethod $method )
$class ReflectionClass
$method ReflectionMethod
    protected function getDefaultRouteName(\ReflectionClass $class, \ReflectionMethod $method)
    {
        return strtolower(str_replace('\\', '_', $class->getName()).'_'.$method->getName());
    }

Same methods

AnnotationClassLoader::getDefaultRouteName ( ReflectionClass $class, ReflectionMethod $method ) : string

Usage Example

Example #1
0
 /**
  * {@inheritdoc}
  */
 protected function getDefaultRouteName(\ReflectionClass $class, \ReflectionMethod $method)
 {
     $routeName = parent::getDefaultRouteName($class, $method);
     return preg_replace(['/(bundle|controller)_/', '/action(_\\d+)?$/', '/__/'], ['_', '\\1', '_'], $routeName);
 }
All Usage Examples Of Symfony\Component\Routing\Loader\AnnotationClassLoader::getDefaultRouteName