BeforeAdvice
class BeforeAdvice extends AbstractAdvice implements AdviceInterface (View source)
Implementation of the Before Advice.
Properties
protected string | $aspectObjectName | Holds the name of the aspect object containing the advice |
from AbstractAdvice |
protected string | $adviceMethodName | Contains the name of the advice method |
from AbstractAdvice |
protected Dispatcher | $dispatcher | A reference to the SignalSlot Dispatcher |
from AbstractAdvice |
protected ObjectManagerInterface | $objectManager | A reference to the Object Manager |
from AbstractAdvice |
protected array | $runtimeEvaluationsDefinition | Runtime evaluations definition array |
from AbstractAdvice |
protected Closure | $runtimeEvaluator | Runtime evaluations function |
from AbstractAdvice |
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.