JoinPoint
class JoinPoint implements JoinPointInterface (View source)
In Flow the join point object contains context information when a point cut matches and the registered advices are executed.
Properties
protected object | $proxy | A reference to the proxy object |
|
protected string | $className | Class name of the target class this join point refers to |
|
protected string | $methodName | Method name of the target method which is about to or has been invoked |
|
protected array | $methodArguments | Array of method arguments which have been passed to the target method |
|
protected AdviceChain | $adviceChain | The advice chain for this join point |
|
protected mixed | $result | The result of the method invocations (only used for After Returning advices) |
|
protected Exception | $exception | The exception thrown (only used for After Throwing advices) |
Methods
Constructor, creates the join point
Returns the reference to the proxy class instance
Returns the class name of the target class this join point refers to
Returns the method name of the method this join point refers to
Returns an array of arguments which have been passed to the target method
Returns the value of the specified method argument
Sets the value of the specified method argument
Returns true if the argument with the specified name exists in the method call this joinpoint refers to.
Returns the advice chain related to this join point
If an exception was thrown by the target method Only makes sense for After Throwing advices.
Returns the exception which has been thrown in the target method.
Returns the result of the method invocation. The result is only available for AfterReturning advices.
Details
__construct(object $proxy, string $className, string $methodName, array $methodArguments, AdviceChain $adviceChain = null, mixed $result = null, Exception $exception = null)
Constructor, creates the join point
ProxyInterface
getProxy()
Returns the reference to the proxy class instance
string
getClassName()
Returns the class name of the target class this join point refers to
string
getMethodName()
Returns the method name of the method this join point refers to
array
getMethodArguments()
Returns an array of arguments which have been passed to the target method
mixed
getMethodArgument(string $argumentName)
Returns the value of the specified method argument
void
setMethodArgument(string $argumentName, mixed $argumentValue)
Sets the value of the specified method argument
bool
isMethodArgument(string $argumentName)
Returns true if the argument with the specified name exists in the method call this joinpoint refers to.
AdviceChain
getAdviceChain()
Returns the advice chain related to this join point
bool
hasException()
If an exception was thrown by the target method Only makes sense for After Throwing advices.
Exception
getException()
Returns the exception which has been thrown in the target method.
If no exception has been thrown, NULL is returned. Only makes sense for After Throwing advices.
mixed
getResult()
Returns the result of the method invocation. The result is only available for AfterReturning advices.