PointcutMethodNameFilter
class PointcutMethodNameFilter implements PointcutFilterInterface (View source)
A little filter which filters for method names
Constants
PATTERN_MATCHVISIBILITYMODIFIER |
|
Properties
protected ReflectionService | $reflectionService | ||
protected string | $methodNameFilterExpression | ||
protected string|null | $methodVisibility | ||
protected LoggerInterface | $logger | ||
protected array | $methodArgumentConstraints |
Methods
Constructor - initializes the filter with the name filter pattern
Injects the (system) logger based on PSR-3.
Checks if the specified method matches against the method name expression.
Returns true if this filter holds runtime evaluations for a previously matched pointcut
Returns runtime evaluations for a previously matched pointcut
Returns the method name filter expression
Returns the method visibility
Returns the method argument constraints
This method is used to optimize the matching process.
Details
__construct(string $methodNameFilterExpression, string $methodVisibility = null, array $methodArgumentConstraints = [])
Constructor - initializes the filter with the name filter pattern
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 against the method name expression.
Returns true if method name, visibility and arguments constraints match.
bool
hasRuntimeEvaluationsDefinition()
Returns true if this filter holds runtime evaluations for a previously matched pointcut
array
getRuntimeEvaluationsDefinition()
Returns runtime evaluations for a previously matched pointcut
string
getMethodNameFilterExpression()
Returns the method name filter expression
string|null
getMethodVisibility()
Returns the method visibility
array
getMethodArgumentConstraints()
Returns the method argument constraints
ClassNameIndex
reduceTargetClassNames(ClassNameIndex $classNameIndex)
This method is used to optimize the matching process.