PointcutMethodAnnotatedWithFilter
class PointcutMethodAnnotatedWithFilter implements PointcutFilterInterface (View source)
A method filter which fires on methods annotated with a certain annotation
Properties
protected ReflectionService | $reflectionService | ||
protected LoggerInterface | $logger | ||
protected string | $annotation | ||
protected array | $annotationValueConstraints |
Methods
The constructor - initializes the method annotation filter with the expected annotation class
Injects the (system) logger based on PSR-3.
Checks if the specified method matches with the method annotation filter pattern
Returns true if this filter holds runtime evaluations for a previously matched pointcut
Returns runtime evaluations for the pointcut.
This method is used to optimize the matching process.
Details
__construct(string $annotation, array $annotationValueConstraints = [])
The constructor - initializes the method 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 method matches with the method annotation 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.
ClassNameIndex
reduceTargetClassNames(ClassNameIndex $classNameIndex)
This method is used to optimize the matching process.