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
Показать файл Открыть проект Примеры использования интерфейса

Открытые методы

Метод Описание
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