AbstractAdvice
class AbstractAdvice implements AdviceInterface (View source)
Base class for Advices.
Properties
protected string | $aspectObjectName | Holds the name of the aspect object containing the advice |
|
protected string | $adviceMethodName | Contains the name of the advice method |
|
protected Dispatcher | $dispatcher | A reference to the SignalSlot Dispatcher |
|
protected ObjectManagerInterface | $objectManager | A reference to the Object Manager |
|
protected array | $runtimeEvaluationsDefinition | Runtime evaluations definition array |
|
protected Closure | $runtimeEvaluator | Runtime evaluations function |
Methods
Constructor
Returns the aspect's object name which has been passed to the constructor
Returns the advice's method name which has been passed to the constructor
Emits a signal when an Advice is invoked
Details
__construct(string $aspectObjectName, string $adviceMethodName, ObjectManagerInterface $objectManager = null, Closure $runtimeEvaluator = null)
Constructor
mixed
invoke(JoinPointInterface $joinPoint)
Invokes the advice method
string
getAspectObjectName()
Returns the aspect's object name which has been passed to the constructor
string
getAdviceMethodName()
Returns the advice's method name which has been passed to the constructor
protected void
emitAdviceInvoked(object $aspectObject, string $methodName, JoinPointInterface $joinPoint)
Emits a signal when an Advice is invoked
The advice is not proxyable, so the signal is dispatched manually here.