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) { ... } }