PHP Class Neos\Flow\Aop\Pointcut\Pointcut

Inheritance: implements Neos\Flow\Aop\Pointcut\PointcutFilterInterface
Show file Open project: neos/flow-development-collection Class Usage Examples

Protected Properties

Property Type Description
$aspectClassName string If this pointcut is based on a pointcut declaration, contains the name of the aspect class where the pointcut was declared
$pointcutExpression string A pointcut expression which configures the pointcut
$pointcutFilterComposite PointcutFilterComposite The filter composite object, created from the pointcut expression
$pointcutMethodName string If this pointcut is based on a pointcut declaration, contains the name of the method acting as the pointcut identifier
$pointcutQueryIdentifier mixed An identifier which is used to detect circular references between pointcuts
$recursionLevel integer Counts how often this pointcut's matches() method has been called during one query

Public Methods

Method Description
__construct ( string $pointcutExpression, PointcutFilterComposite $pointcutFilterComposite, string $aspectClassName, string $pointcutMethodName = null ) The constructor
getAspectClassName ( ) : string Returns the aspect class name where the pointcut was declared.
getPointcutExpression ( ) : string Returns the pointcut expression which has been passed to the constructor.
getPointcutMethodName ( ) : string Returns the pointcut method name (if any was defined)
getRuntimeEvaluationsClosureCode ( ) : string Returns the PHP code (closure) that evaluates the runtime evaluations
getRuntimeEvaluationsDefinition ( ) : array Returns runtime evaluations for the pointcut.
hasRuntimeEvaluationsDefinition ( ) : boolean Returns TRUE if this filter holds runtime evaluations for a previously matched pointcut
matches ( string $className, string $methodName, string $methodDeclaringClassName, mixed $pointcutQueryIdentifier ) : boolean Checks if the given class and method match this pointcut.
reduceTargetClassNames ( ClassNameIndex $classNameIndex ) : ClassNameIndex This method is used to optimize the matching process.

Method Details

__construct() public method

The constructor
public __construct ( string $pointcutExpression, PointcutFilterComposite $pointcutFilterComposite, string $aspectClassName, string $pointcutMethodName = null )
$pointcutExpression string A pointcut expression which configures the pointcut
$pointcutFilterComposite PointcutFilterComposite
$aspectClassName string The name of the aspect class where the pointcut was declared (either explicitly or from an advice's pointcut expression)
$pointcutMethodName string (optional) If the pointcut is created from a pointcut declaration, the name of the method declaring the pointcut must be passed

getAspectClassName() public method

Returns the aspect class name where the pointcut was declared.
public getAspectClassName ( ) : string
return string The aspect class name where the pointcut was declared

getPointcutExpression() public method

This can be used for debugging pointcuts.
public getPointcutExpression ( ) : string
return string The pointcut expression

getPointcutMethodName() public method

Returns the pointcut method name (if any was defined)
public getPointcutMethodName ( ) : string
return string The pointcut method name

getRuntimeEvaluationsClosureCode() public method

Returns the PHP code (closure) that evaluates the runtime evaluations
public getRuntimeEvaluationsClosureCode ( ) : string
return string The closure code

getRuntimeEvaluationsDefinition() public method

Returns runtime evaluations for the pointcut.
public getRuntimeEvaluationsDefinition ( ) : array
return array Runtime evaluations

hasRuntimeEvaluationsDefinition() public method

Returns TRUE if this filter holds runtime evaluations for a previously matched pointcut
public hasRuntimeEvaluationsDefinition ( ) : boolean
return boolean TRUE if this filter has runtime evaluations

matches() public method

Before each match run, reset() must be called to reset the circular references guard.
public matches ( string $className, string $methodName, string $methodDeclaringClassName, mixed $pointcutQueryIdentifier ) : boolean
$className string Class to check against
$methodName string Method to check against
$methodDeclaringClassName string Name of the class the method was originally declared in
$pointcutQueryIdentifier mixed Some identifier for this query - must at least differ from a previous identifier. Used for circular reference detection.
return boolean TRUE if class and method match this point cut, otherwise FALSE

reduceTargetClassNames() public method

This method is used to optimize the matching process.
public reduceTargetClassNames ( ClassNameIndex $classNameIndex ) : ClassNameIndex
$classNameIndex Neos\Flow\Aop\Builder\ClassNameIndex
return Neos\Flow\Aop\Builder\ClassNameIndex

Property Details

$aspectClassName protected property

If this pointcut is based on a pointcut declaration, contains the name of the aspect class where the pointcut was declared
protected string $aspectClassName
return string

$pointcutExpression protected property

A pointcut expression which configures the pointcut
protected string $pointcutExpression
return string

$pointcutFilterComposite protected property

The filter composite object, created from the pointcut expression
protected PointcutFilterComposite,Neos\Flow\Aop\Pointcut $pointcutFilterComposite
return PointcutFilterComposite

$pointcutMethodName protected property

If this pointcut is based on a pointcut declaration, contains the name of the method acting as the pointcut identifier
protected string $pointcutMethodName
return string

$pointcutQueryIdentifier protected property

An identifier which is used to detect circular references between pointcuts
protected mixed $pointcutQueryIdentifier
return mixed

$recursionLevel protected property

Counts how often this pointcut's matches() method has been called during one query
protected int $recursionLevel
return integer