Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. AttributeClassLoader.php

function AttributeClassLoader::getAttributes

Return value

iterable<int, RouteAttribute>

1 call to AttributeClassLoader::getAttributes()
AttributeClassLoader::load in vendor/symfony/routing/Loader/AttributeClassLoader.php

File

vendor/symfony/routing/Loader/AttributeClassLoader.php, line 362

Class

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

Namespace

Symfony\Component\Routing\Loader

Code

private function getAttributes(\ReflectionClass|\ReflectionMethod $reflection) : iterable {
    // to be replaced in Symfony 8.0 by $this->routeAttributeClass
    foreach ($reflection->getAttributes($this->routeAnnotationClass, \ReflectionAttribute::IS_INSTANCEOF) as $attribute) {
        (yield $attribute->newInstance());
    }
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal