public function getClassAnnotations($className, $annotationClassName = null)
    {
        $className = $this->prepareClassReflectionForUsage($className);

        $annotationClassName = $annotationClassName === null ? null : $this->cleanClassName($annotationClassName);
        if (!isset($this->classReflectionData[$className][self::DATA_CLASS_ANNOTATIONS])) {
            return [];
        }
        if ($annotationClassName === null) {
            return $this->classReflectionData[$className][self::DATA_CLASS_ANNOTATIONS];
        }

        $annotations = [];
        foreach ($this->classReflectionData[$className][self::DATA_CLASS_ANNOTATIONS] as $annotation) {
            if ($annotation instanceof $annotationClassName) {
                $annotations[] = $annotation;
            }
        }

        return $annotations;
    }
public function getClassAnnotations($className, $annotationClassName = null)
    {
        $className = $this->prepareClassReflectionForUsage($className);

        $annotationClassName = $annotationClassName === null ? null : $this->cleanClassName($annotationClassName);
        if (!isset($this->classReflectionData[$className][self::DATA_CLASS_ANNOTATIONS])) {
            return [];
        }
        if ($annotationClassName === null) {
            return $this->classReflectionData[$className][self::DATA_CLASS_ANNOTATIONS];
        }

        $annotations = [];
        foreach ($this->classReflectionData[$className][self::DATA_CLASS_ANNOTATIONS] as $annotation) {
            if ($annotation instanceof $annotationClassName) {
                $annotations[] = $annotation;
            }
        }

        return $annotations;
    }
public function getClassAnnotations ( $ className , $ annotationClassName = null ) { $ className = $ this -> prepareClassReflectionForUsage ( $ className ) ; $ annotationClassName = $ annotationClassName === null ? null : $ this -> cleanClassName ( $ annotationClassName ) ; if ( ! isset ( $ this -> classReflectionData [ $ className ] [ self :: DATA_CLASS_ANNOTATIONS ] ) ) { return [ ] ; } if ( $ annotationClassName === null ) { return $ this -> classReflectionData [ $ className ] [ self :: DATA_CLASS_ANNOTATIONS ] ; } $ annotations = [ ] ; foreach ( $ this -> classReflectionData [ $ className ] [ self :: DATA_CLASS_ANNOTATIONS ] as $ annotation ) { if ( $ annotation instanceof $ annotationClassName ) { $ annotations [ ] = $ annotation ; } } return $ annotations ; }
Returns the specified class annotations or an empty array

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