PHP Class Neos\Flow\Aop\AspectContainer

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.
Mostra file Open project: neos/flow-development-collection Class Usage Examples

Protected Properties

Property Type Description
$advisors array An array of \Neos\Flow\Aop\Advisor objects
$cachedTargetClassNameCandidates Neos\Flow\Aop\Builder\ClassNameIndex
$className string
$interfaceIntroductions array An array of \Neos\Flow\Aop\InterfaceIntroduction objects
$pointcuts array An array of explicitly declared \Neos\Flow\Pointcut objects
$propertyIntroductions array An array of \Neos\Flow\Aop\PropertyIntroduction objects
$traitIntroductions array An array of \Neos\Flow\Aop\TraitIntroduction objects

Public Methods

Method Description
__construct ( string $className ) The constructor
addAdvisor ( Advisor $advisor ) : void Adds an advisor to this aspect container
addInterfaceIntroduction ( InterfaceIntroduction $introduction ) : void Adds an introduction declaration to this aspect container
addPointcut ( Pointcut $pointcut ) : void Adds a pointcut (from a pointcut declaration) to this aspect container
addPropertyIntroduction ( PropertyIntroduction $introduction ) : void Adds an introduction declaration to this aspect container
addTraitIntroduction ( TraitIntroduction $introduction ) : void Adds an introduction declaration to this aspect container
getAdvisors ( ) : array Returns the advisors which were defined in the aspect
getCachedTargetClassNameCandidates ( ) : ClassNameIndex
getClassName ( ) : string Returns the name of the aspect class
getInterfaceIntroductions ( ) : array Returns the interface introductions which were defined in the aspect
getPointcuts ( ) : array 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!
getPropertyIntroductions ( ) : array Returns the property introductions which were defined in the aspect
getTraitIntroductions ( ) : array Returns the trait introductions which were defined in the aspect
reduceTargetClassNames ( ClassNameIndex $classNameIndex ) : ClassNameIndex This method is used to optimize the matching process.

Method Details

__construct() public method

The constructor
public __construct ( string $className )
$className string Name of the aspect class

addAdvisor() public method

Adds an advisor to this aspect container
public addAdvisor ( Advisor $advisor ) : void
$advisor Advisor The advisor to add
return void

addInterfaceIntroduction() public method

Adds an introduction declaration to this aspect container
public addInterfaceIntroduction ( InterfaceIntroduction $introduction ) : void
$introduction InterfaceIntroduction
return void

addPointcut() public method

Adds a pointcut (from a pointcut declaration) to this aspect container
public addPointcut ( Pointcut $pointcut ) : void
$pointcut Neos\Flow\Aop\Pointcut\Pointcut The pointcut to add
return void

addPropertyIntroduction() public method

Adds an introduction declaration to this aspect container
public addPropertyIntroduction ( PropertyIntroduction $introduction ) : void
$introduction PropertyIntroduction
return void

addTraitIntroduction() public method

Adds an introduction declaration to this aspect container
public addTraitIntroduction ( TraitIntroduction $introduction ) : void
$introduction TraitIntroduction
return void

getAdvisors() public method

Returns the advisors which were defined in the aspect
public getAdvisors ( ) : array
return array Array of \Neos\Flow\Aop\Advisor objects

getCachedTargetClassNameCandidates() public method

public getCachedTargetClassNameCandidates ( ) : ClassNameIndex
return Neos\Flow\Aop\Builder\ClassNameIndex

getClassName() public method

Returns the name of the aspect class
public getClassName ( ) : string
return string Name of the aspect class

getInterfaceIntroductions() public method

Returns the interface introductions which were defined in the aspect
public getInterfaceIntroductions ( ) : array
return array Array of \Neos\Flow\Aop\InterfaceIntroduction objects

getPointcuts() public method

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!
public getPointcuts ( ) : array
return array Array of \Neos\Flow\Aop\Pointcut\Pointcut objects

getPropertyIntroductions() public method

Returns the property introductions which were defined in the aspect
public getPropertyIntroductions ( ) : array
return array Array of \Neos\Flow\Aop\PropertyIntroduction objects

getTraitIntroductions() public method

Returns the trait introductions which were defined in the aspect
public getTraitIntroductions ( ) : array
return array Array of \Neos\Flow\Aop\TraitIntroduction objects

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

$advisors protected_oe property

An array of \Neos\Flow\Aop\Advisor objects
protected array $advisors
return array

$cachedTargetClassNameCandidates protected_oe property

protected ClassNameIndex,Neos\Flow\Aop\Builder $cachedTargetClassNameCandidates
return Neos\Flow\Aop\Builder\ClassNameIndex

$className protected_oe property

protected string $className
return string

$interfaceIntroductions protected_oe property

An array of \Neos\Flow\Aop\InterfaceIntroduction objects
protected array $interfaceIntroductions
return array

$pointcuts protected_oe property

An array of explicitly declared \Neos\Flow\Pointcut objects
protected array $pointcuts
return array

$propertyIntroductions protected_oe property

An array of \Neos\Flow\Aop\PropertyIntroduction objects
protected array $propertyIntroductions
return array

$traitIntroductions protected_oe property

An array of \Neos\Flow\Aop\TraitIntroduction objects
protected array $traitIntroductions
return array