PHP 인터페이스 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)
    {
        ...
    }
}
또한 보기: Joinpoint
상속: extends Go\Aop\Advice
파일 보기 프로젝트 열기: goaop/framework 0 사용 예제들

공개 메소드들

메소드 설명
invoke ( Go\Aop\Intercept\Joinpoint $joinpoint ) : mixed Implement this method to perform extra actions before and after the invocation of joinpoint.

메소드 상세

invoke() 공개 메소드

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
리턴 mixed the result of the call