PointcutFilterComposite
class PointcutFilterComposite implements PointcutFilterInterface (View source)
This composite allows to check for match against a row pointcut filters by only one method call. All registered filters will be invoked and if one filter doesn't match, the overall result is "no".
Properties
protected array | $filters | ||
protected bool | $earlyReturn | ||
protected array | $runtimeEvaluationsDefinition | ||
protected array | $globalRuntimeEvaluationsDefinition |
Methods
Checks if the specified class and method match the registered class- and method filter patterns.
Returns true if this filter holds runtime evaluations for a previously matched pointcut
Returns runtime evaluations for the pointcut.
Sets static runtime evaluations for to pointcut, that will be used for every method this composite matches
Returns the PHP code (closure) that can evaluate the runtime evaluations
This method is used to optimize the matching process.
Returns the PHP code of the conditions used for runtime evaluations
Returns the PHP code of the conditions used argument runtime evaluations
Returns the PHP code of the conditions used for global runtime evaluations
Returns the PHP code used to access one argument of a runtime evaluation
Details
bool
matches(string $className, string $methodName, string $methodDeclaringClassName, mixed $pointcutQueryIdentifier)
Checks if the specified class and method match the registered class- and method filter patterns.
void
addFilter(string $operator, PointcutFilterInterface $filter)
Adds a class filter to the composite
bool
hasRuntimeEvaluationsDefinition()
Returns true if this filter holds runtime evaluations for a previously matched pointcut
array
getRuntimeEvaluationsDefinition()
Returns runtime evaluations for the pointcut.
void
setGlobalRuntimeEvaluationsDefinition(array $runtimeEvaluations)
Sets static runtime evaluations for to pointcut, that will be used for every method this composite matches
string
getRuntimeEvaluationsClosureCode()
Returns the PHP code (closure) that can evaluate the runtime evaluations
ClassNameIndex
reduceTargetClassNames(ClassNameIndex $classNameIndex)
This method is used to optimize the matching process.
protected string
buildRuntimeEvaluationsConditionCode(string $operator, array $conditions, bool $useGlobalObjects = false)
Returns the PHP code of the conditions used for runtime evaluations
protected string
buildMethodArgumentsEvaluationConditionCode(array $conditions, bool $useGlobalObjects = false)
Returns the PHP code of the conditions used argument runtime evaluations
protected string
buildGlobalRuntimeEvaluationsConditionCode(array $conditions, bool $useGlobalObjects = false)
Returns the PHP code of the conditions used for global runtime evaluations
protected string
buildArgumentEvaluationAccessCode(mixed $argumentAccess, bool $useGlobalObjects = false)
Returns the PHP code used to access one argument of a runtime evaluation