class CachedReader implements Reader (View source)

A cache aware annotation reader.

Methods

__construct(Reader $reader, Cache $cache, bool $debug = false)

Constructor

mixed
getClassAnnotations(ReflectionClass $class)

Get annotations for class

mixed
getClassAnnotation(ReflectionClass $class, string $annotationName)

Get selected annotation for class

mixed
getPropertyAnnotations(ReflectionProperty $property)

Get annotations for property

mixed
getPropertyAnnotation(ReflectionProperty $property, string $annotationName)

Get selected annotation for property

mixed
getMethodAnnotations(ReflectionMethod $method)

Get method annotations

mixed
getMethodAnnotation(ReflectionMethod $method, string $annotationName)

Get selected method annotation

clearLoadedAnnotations()

Clear loaded annotations

Details

__construct(Reader $reader, Cache $cache, bool $debug = false)

Constructor

Parameters

Reader $reader
Cache $cache
bool $debug

mixed getClassAnnotations(ReflectionClass $class)

Get annotations for class

Parameters

ReflectionClass $class

Return Value

mixed

mixed getClassAnnotation(ReflectionClass $class, string $annotationName)

Get selected annotation for class

Parameters

ReflectionClass $class
string $annotationName

Return Value

mixed

mixed getPropertyAnnotations(ReflectionProperty $property)

Get annotations for property

Parameters

ReflectionProperty $property

Return Value

mixed

mixed getPropertyAnnotation(ReflectionProperty $property, string $annotationName)

Get selected annotation for property

Parameters

ReflectionProperty $property
string $annotationName

Return Value

mixed

mixed getMethodAnnotations(ReflectionMethod $method)

Get method annotations

Parameters

ReflectionMethod $method

Return Value

mixed

mixed getMethodAnnotation(ReflectionMethod $method, string $annotationName)

Get selected method annotation

Parameters

ReflectionMethod $method
string $annotationName

Return Value

mixed

clearLoadedAnnotations()

Clear loaded annotations