PHP Interface Go\Aop\Intercept\Interceptor
A generic interceptor can intercept runtime events that occur
within a base program. Those events are materialized by (reified
in) joinpoints. Runtime joinpoints can be invocations, field
access, exceptions...
This interface is not used directly. Use the the sub-interfaces
to intercept specific events. For instance, the following class
implements some specific interceptors in order to implement a
debugger:
class DebuggingInterceptor implements Interceptor
{
public function invoke(Joinpoint $i)
{
$this->debug($i->getStaticPart(), $i->getThis(), $i->getArgs());
return $i->proceed();
}
protected function debug($accessibleObject, $object, $value)
{
...
}
}
Mostra file
Open project: goaop/framework
Interface Usage Examples
Public Methods
Method |
Description |
|
invoke ( Go\Aop\Intercept\Joinpoint $joinpoint ) : mixed |
Implement this method to perform extra actions before and after the invocation of joinpoint. |
|
Method Details
Implement this method to perform extra actions before and after the invocation of joinpoint.
public invoke ( Go\Aop\Intercept\Joinpoint $joinpoint ) : mixed |
$joinpoint |
Go\Aop\Intercept\Joinpoint |
Current joinpoint |
return |
mixed |
the result of the call |