class SimpleAnnotationReader implements Reader (View source)

Simple Annotation Reader.

This annotation reader is intended to be used in projects where you have full-control over all annotations that are available.

Methods

__construct()

Constructor.

addNamespace(string $namespace)

Adds a namespace in which we will look for annotations.

mixed
getClassAnnotations(ReflectionClass $class)

Gets the annotations applied to a class.

mixed
getMethodAnnotations(ReflectionMethod $method)

Gets the annotations applied to a method.

mixed
getPropertyAnnotations(ReflectionProperty $property)

Gets the annotations applied to a property.

mixed
getClassAnnotation(ReflectionClass $class, string $annotationName)

Gets a class annotation.

mixed
getMethodAnnotation(ReflectionMethod $method, string $annotationName)

Gets a method annotation.

mixed
getPropertyAnnotation(ReflectionProperty $property, string $annotationName)

Gets a property annotation.

Details

__construct()

Constructor.

Initializes a new SimpleAnnotationReader.

addNamespace(string $namespace)

Adds a namespace in which we will look for annotations.

Parameters

string $namespace

mixed getClassAnnotations(ReflectionClass $class)

Gets the annotations applied to a class.

Parameters

ReflectionClass $class

Return Value

mixed

mixed getMethodAnnotations(ReflectionMethod $method)

Gets the annotations applied to a method.

Parameters

ReflectionMethod $method

Return Value

mixed

mixed getPropertyAnnotations(ReflectionProperty $property)

Gets the annotations applied to a property.

Parameters

ReflectionProperty $property

Return Value

mixed

mixed getClassAnnotation(ReflectionClass $class, string $annotationName)

Gets a class annotation.

Parameters

ReflectionClass $class
string $annotationName

Return Value

mixed

mixed getMethodAnnotation(ReflectionMethod $method, string $annotationName)

Gets a method annotation.

Parameters

ReflectionMethod $method
string $annotationName

Return Value

mixed

mixed getPropertyAnnotation(ReflectionProperty $property, string $annotationName)

Gets a property annotation.

Parameters

ReflectionProperty $property
string $annotationName

Return Value

mixed