public function getMethodAnnotations($className, $methodName, $annotationClassName = null)
    {
        if (!$this->initialized) {
            $this->initialize();
        }
        $className = $this->cleanClassName($className);
        $annotationClassName = $annotationClassName === null ? null : $this->cleanClassName($annotationClassName);

        $annotations = [];
        $methodAnnotations = $this->annotationReader->getMethodAnnotations(new MethodReflection($className, $methodName));
        if ($annotationClassName === null) {
            return $methodAnnotations;
        }

        foreach ($methodAnnotations as $annotation) {
            if ($annotation instanceof $annotationClassName) {
                $annotations[] = $annotation;
            }
        }

        return $annotations;
    }
public function getMethodAnnotations($className, $methodName, $annotationClassName = null)
    {
        if (!$this->initialized) {
            $this->initialize();
        }
        $className = $this->cleanClassName($className);
        $annotationClassName = $annotationClassName === null ? null : $this->cleanClassName($annotationClassName);

        $annotations = [];
        $methodAnnotations = $this->annotationReader->getMethodAnnotations(new MethodReflection($className, $methodName));
        if ($annotationClassName === null) {
            return $methodAnnotations;
        }

        foreach ($methodAnnotations as $annotation) {
            if ($annotation instanceof $annotationClassName) {
                $annotations[] = $annotation;
            }
        }

        return $annotations;
    }
public function getMethodAnnotations ( $ className , $ methodName , $ annotationClassName = null ) { if ( ! $ this -> initialized ) { $ this -> initialize ( ) ; } $ className = $ this -> cleanClassName ( $ className ) ; $ annotationClassName = $ annotationClassName === null ? null : $ this -> cleanClassName ( $ annotationClassName ) ; $ annotations = [ ] ; $ methodAnnotations = $ this -> annotationReader -> getMethodAnnotations ( new MethodReflection ( $ className , $ methodName ) ) ; if ( $ annotationClassName === null ) { return $ methodAnnotations ; } foreach ( $ methodAnnotations as $ annotation ) { if ( $ annotation instanceof $ annotationClassName ) { $ annotations [ ] = $ annotation ; } } return $ annotations ; }
Returns the specified method annotations or an empty array

@param string $className Name of the class
@param string $methodName Name of the method
@param string $annotationClassName Annotation to filter for
@return array<object>
@api
Returns the specified method annotations or an empty array