Go\Aop\Framework\DeclareErrorInterceptor::invoke PHP Method

invoke() public method

Implement this method to perform extra treatments before and after the invocation. Polite implementations would certainly like to invoke {@link Joinpoint::proceed()}.
public invoke ( Go\Aop\Intercept\Joinpoint $joinpoint ) : mixed
$joinpoint Go\Aop\Intercept\Joinpoint the method invocation joinpoint
return mixed the result of the call to {@link Joinpoint::proceed()}
    public function invoke(Joinpoint $joinpoint)
    {
        $reflection = $joinpoint->getStaticPart();
        $reflectorName = 'unknown';
        if ($reflection && method_exists($reflection, 'getName')) {
            $reflectorName = $reflection->getName();
        }
        $adviceMethod = $this->adviceMethod;
        $adviceMethod($joinpoint->getThis(), $reflectorName, $this->message, $this->level);
        return $joinpoint->proceed();
    }