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

Breadcrumb

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

function AnnotationReader::getFunctionAnnotations

Gets the annotations applied to a function.

@phpstan-return list<object> An array of Annotations.

1 call to AnnotationReader::getFunctionAnnotations()
AnnotationReader::getFunctionAnnotation in vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationReader.php
Gets a function annotation.

File

vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationReader.php, line 237

Class

AnnotationReader
A reader for docblock annotations.

Namespace

Doctrine\Common\Annotations

Code

public function getFunctionAnnotations(ReflectionFunction $function) : array {
    $context = 'function ' . $function->getName();
    $this->parser
        ->setTarget(Target::TARGET_FUNCTION);
    $this->parser
        ->setImports($this->getImports($function));
    $this->parser
        ->setIgnoredAnnotationNames($this->getIgnoredAnnotationNames($function));
    $this->parser
        ->setIgnoredAnnotationNamespaces(self::$globalIgnoredNamespaces);
    return $this->parser
        ->parse($function->getDocComment(), $context);
}

API Navigation

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