class PointcutClassAnnotatedWithFilter implements PointcutFilterInterface (View source)

A class filter which fires on classes annotated with a certain annotation

Properties

protected ReflectionService $reflectionService
protected LoggerInterface $logger
protected string $annotation
protected array $annotationValueConstraints

Methods

__construct(string $annotation, array $annotationValueConstraints = [])

The constructor - initializes the class annotation filter with the expected annotation class

void
injectReflectionService(ReflectionService $reflectionService)

Injects the reflection service

void
injectLogger(LoggerInterface $logger)

Injects the (system) logger based on PSR-3.

bool
matches(string $className, string $methodName, string $methodDeclaringClassName, mixed $pointcutQueryIdentifier)

Checks if the specified class matches with the class tag filter pattern

bool
hasRuntimeEvaluationsDefinition()

Returns true if this filter holds runtime evaluations for a previously matched pointcut

array
getRuntimeEvaluationsDefinition()

Returns runtime evaluations for the pointcut.

reduceTargetClassNames(ClassNameIndex $classNameIndex)

This method is used to optimize the matching process.

Details

__construct(string $annotation, array $annotationValueConstraints = [])

The constructor - initializes the class annotation filter with the expected annotation class

Parameters

string $annotation

An annotation class (for example "@Neos\Flow\Annotations\Aspect") which defines which class annotations should match

array $annotationValueConstraints

void injectReflectionService(ReflectionService $reflectionService)

Injects the reflection service

Parameters

ReflectionService $reflectionService

The reflection service

Return Value

void

void injectLogger(LoggerInterface $logger)

Injects the (system) logger based on PSR-3.

Parameters

LoggerInterface $logger

Return Value

void

bool matches(string $className, string $methodName, string $methodDeclaringClassName, mixed $pointcutQueryIdentifier)

Checks if the specified class matches with the class tag filter pattern

Parameters

string $className

Name of the class to check against

string $methodName

Name of the method to check against

string $methodDeclaringClassName

Name of the class the method was originally declared in

mixed $pointcutQueryIdentifier

Some identifier for this query - must at least differ from a previous identifier. Used for circular reference detection.

Return Value

bool

true if the class / method match, otherwise false

bool hasRuntimeEvaluationsDefinition()

Returns true if this filter holds runtime evaluations for a previously matched pointcut

Return Value

bool

true if this filter has runtime evaluations

array getRuntimeEvaluationsDefinition()

Returns runtime evaluations for the pointcut.

Return Value

array

Runtime evaluations

ClassNameIndex reduceTargetClassNames(ClassNameIndex $classNameIndex)

This method is used to optimize the matching process.

Parameters

ClassNameIndex $classNameIndex

An index of class names

Return Value

ClassNameIndex

The filtered result, with pointcuts possibly covered by this filter