PHP Class Neos\Flow\Aop\Advice\AbstractAdvice

Inheritance: implements Neos\Flow\Aop\Advice\AdviceInterface
Exibir arquivo Open project: neos/flow-development-collection

Protected Properties

Property Type Description
$adviceMethodName string Contains the name of the advice method
$aspectObjectName string Holds the name of the aspect object containing the advice
$dispatcher Neos\Flow\SignalSlot\Dispatcher A reference to the SignalSlot Dispatcher
$objectManager Neos\Flow\ObjectManagement\ObjectManagerInterface A reference to the Object Manager
$runtimeEvaluationsDefinition array Runtime evaluations definition array
$runtimeEvaluator Closure Runtime evaluations function

Public Methods

Method Description
__construct ( string $aspectObjectName, string $adviceMethodName, Neos\Flow\ObjectManagement\ObjectManagerInterface $objectManager = null, Closure $runtimeEvaluator = null ) Constructor
getAdviceMethodName ( ) : string Returns the advice's method name which has been passed to the constructor
getAspectObjectName ( ) : string Returns the aspect's object name which has been passed to the constructor
invoke ( Neos\Flow\Aop\JoinPointInterface $joinPoint ) : mixed Invokes the advice method

Protected Methods

Method Description
emitAdviceInvoked ( object $aspectObject, string $methodName, Neos\Flow\Aop\JoinPointInterface $joinPoint ) : void Emits a signal when an Advice is invoked

Method Details

__construct() public method

Constructor
public __construct ( string $aspectObjectName, string $adviceMethodName, Neos\Flow\ObjectManagement\ObjectManagerInterface $objectManager = null, Closure $runtimeEvaluator = null )
$aspectObjectName string Name of the aspect object containing the advice
$adviceMethodName string Name of the advice method
$objectManager Neos\Flow\ObjectManagement\ObjectManagerInterface Only require if a runtime evaluations function is specified
$runtimeEvaluator Closure Runtime evaluations function

emitAdviceInvoked() protected method

The advice is not proxyable, so the signal is dispatched manually here.
protected emitAdviceInvoked ( object $aspectObject, string $methodName, Neos\Flow\Aop\JoinPointInterface $joinPoint ) : void
$aspectObject object
$methodName string
$joinPoint Neos\Flow\Aop\JoinPointInterface
return void

getAdviceMethodName() public method

Returns the advice's method name which has been passed to the constructor
public getAdviceMethodName ( ) : string
return string The name of the advice method

getAspectObjectName() public method

Returns the aspect's object name which has been passed to the constructor
public getAspectObjectName ( ) : string
return string The object name of the aspect

invoke() public method

Invokes the advice method
public invoke ( Neos\Flow\Aop\JoinPointInterface $joinPoint ) : mixed
$joinPoint Neos\Flow\Aop\JoinPointInterface The current join point which is passed to the advice method
return mixed Result of the advice method

Property Details

$adviceMethodName protected_oe property

Contains the name of the advice method
protected string $adviceMethodName
return string

$aspectObjectName protected_oe property

Holds the name of the aspect object containing the advice
protected string $aspectObjectName
return string

$dispatcher protected_oe property

A reference to the SignalSlot Dispatcher
protected Dispatcher,Neos\Flow\SignalSlot $dispatcher
return Neos\Flow\SignalSlot\Dispatcher

$objectManager protected_oe property

A reference to the Object Manager
protected ObjectManagerInterface,Neos\Flow\ObjectManagement $objectManager
return Neos\Flow\ObjectManagement\ObjectManagerInterface

$runtimeEvaluationsDefinition protected_oe property

Runtime evaluations definition array
protected array $runtimeEvaluationsDefinition
return array

$runtimeEvaluator protected_oe property

Runtime evaluations function
protected Closure $runtimeEvaluator
return Closure