You are here

protected function AnnotationClassLoader::getDefaultRouteName in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/routing/Loader/AnnotationClassLoader.php \Symfony\Component\Routing\Loader\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 vendor/symfony/routing/Loader/AnnotationClassLoader.php

File

vendor/symfony/routing/Loader/AnnotationClassLoader.php, line 198

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;
}