class PointcutFilter implements PointcutFilterInterface (View source)

A filter which refers to another pointcut.

Properties

protected string $aspectClassName

Name of the aspect class where the pointcut was declared

protected string $pointcutMethodName

Name of the pointcut method

protected Pointcut $pointcut

The pointcut this filter is based on

protected ProxyClassBuilder $proxyClassBuilder

A reference to the AOP Proxy ClassBuilder

Methods

__construct(string $aspectClassName, string $pointcutMethodName)

The constructor - initializes the pointcut filter with the name of the pointcut we're referring to

void
injectProxyClassBuilder(ProxyClassBuilder $proxyClassBuilder)

Injects the AOP Proxy Class Builder

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

Checks if the specified class and method matches with the pointcut

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 $aspectClassName, string $pointcutMethodName)

The constructor - initializes the pointcut filter with the name of the pointcut we're referring to

Parameters

string $aspectClassName

Name of the aspect class containing the pointcut

string $pointcutMethodName

Name of the method which acts as an anchor for the pointcut name and expression

void injectProxyClassBuilder(ProxyClassBuilder $proxyClassBuilder)

Injects the AOP Proxy Class Builder

Parameters

ProxyClassBuilder $proxyClassBuilder

Return Value

void

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

Checks if the specified class and method matches with the pointcut

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

Exceptions

UnknownPointcutException

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