protected function AnnotationClassLoader::getDefaultRouteName

Gets the default route name for a class method.

Parameters

\ReflectionClass $class:

\ReflectionMethod $method:

Return value

string

1 call to AnnotationClassLoader::getDefaultRouteName()
AnnotationClassLoader::addRoute in drupal/core/vendor/symfony/routing/Symfony/Component/Routing/Loader/AnnotationClassLoader.php

File

drupal/core/vendor/symfony/routing/Symfony/Component/Routing/Loader/AnnotationClassLoader.php, line 234

Class

AnnotationClassLoader
AnnotationClassLoader loads routing information from a PHP class and its methods.

Namespace

Symfony\Component\Routing\Loader

Code

protected function getDefaultRouteName(\ReflectionClass $class, \ReflectionMethod $method) {
  $name = strtolower(str_replace('\\', '_', $class->name) . '_' . $method->name);
  if ($this->defaultRouteIndex > 0) {
    $name .= '_' . $this->defaultRouteIndex;
  }
  $this->defaultRouteIndex++;
  return $name;
}