invoke() public method

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
 /**
  * Method invoker
  *
  * @param Joinpoint $joinpoint the method invocation joinpoint
  *
  * @return mixed the result of the call to {@see Joinpoint->proceed()}
  */
 public final function invoke(Joinpoint $joinpoint)
 {
     if ($joinpoint instanceof Invocation) {
         if ($this->dynamicPointFilter->matches($joinpoint->getStaticPart(), $joinpoint->getThis(), $joinpoint->getArguments())) {
             return $this->interceptor->invoke($joinpoint);
         }
     }
     return $joinpoint->proceed();
 }
 /**
  * Method invoker
  *
  * @param Joinpoint $joinpoint the method invocation joinpoint
  *
  * @return mixed the result of the call to {@see Joinpoint->proceed()}
  */
 public final function invoke(Joinpoint $joinpoint)
 {
     if ($joinpoint instanceof Invocation) {
         $point = $joinpoint->getStaticPart();
         $instance = $joinpoint->getThis();
         $context = new \ReflectionClass($instance);
         if ($this->pointFilter->matches($point, $context, $instance, $joinpoint->getArguments())) {
             return $this->interceptor->invoke($joinpoint);
         }
     }
     return $joinpoint->proceed();
 }