AspectContainer
class AspectContainer (View source)
An aspect is represented by class tagged with the "aspect" annotation.
The aspect class may contain advices and pointcut declarations. Aspect classes are wrapped by this Aspect Container.
For each advice a pointcut expression (not declaration!) is required to define when an advice should apply. The combination of advice and pointcut expression is called "advisor".
A pointcut declaration only contains a pointcut expression and is used to make pointcut expressions reusable and combinable.
An introduction declaration on the class level contains an interface name and a pointcut expression and is used to introduce a new interface to the target class.
If used on a property an introduction contains a pointcut expression and is used to introduce the annotated property into the target class.
Properties
protected string | $className | ||
protected array | $advisors | An array of \Neos\Flow\Aop\Advisor objects |
|
protected array | $interfaceIntroductions | An array of \Neos\Flow\Aop\InterfaceIntroduction objects |
|
protected array | $propertyIntroductions | An array of \Neos\Flow\Aop\PropertyIntroduction objects |
|
protected array | $traitIntroductions | An array of \Neos\Flow\Aop\TraitIntroduction objects |
|
protected array | $pointcuts | An array of explicitly declared \Neos\Flow\Pointcut objects |
|
protected ClassNameIndex | $cachedTargetClassNameCandidates |
Methods
The constructor
Returns the name of the aspect class
Returns the advisors which were defined in the aspect
Returns the interface introductions which were defined in the aspect
Returns the property introductions which were defined in the aspect
Returns the trait introductions which were defined in the aspect
Returns the pointcuts which were declared in the aspect. This does not contain the pointcuts which were made out of the pointcut expressions for the advisors!
Adds an introduction declaration to this aspect container
Adds an introduction declaration to this aspect container
Adds an introduction declaration to this aspect container
Adds a pointcut (from a pointcut declaration) to this aspect container
This method is used to optimize the matching process.
No description
Details
__construct(string $className)
The constructor
string
getClassName()
Returns the name of the aspect class
array
getAdvisors()
Returns the advisors which were defined in the aspect
array
getInterfaceIntroductions()
Returns the interface introductions which were defined in the aspect
array
getPropertyIntroductions()
Returns the property introductions which were defined in the aspect
array
getTraitIntroductions()
Returns the trait introductions which were defined in the aspect
array
getPointcuts()
Returns the pointcuts which were declared in the aspect. This does not contain the pointcuts which were made out of the pointcut expressions for the advisors!
void
addAdvisor(Advisor $advisor)
Adds an advisor to this aspect container
void
addInterfaceIntroduction(InterfaceIntroduction $introduction)
Adds an introduction declaration to this aspect container
void
addPropertyIntroduction(PropertyIntroduction $introduction)
Adds an introduction declaration to this aspect container
void
addTraitIntroduction(TraitIntroduction $introduction)
Adds an introduction declaration to this aspect container
void
addPointcut(Pointcut $pointcut)
Adds a pointcut (from a pointcut declaration) to this aspect container
ClassNameIndex
reduceTargetClassNames(ClassNameIndex $classNameIndex)
This method is used to optimize the matching process.
ClassNameIndex
getCachedTargetClassNameCandidates()
No description