public function proceed()
{
if (isset($this->advices[$this->current])) {
/** @var $currentInterceptor \Go\Aop\Intercept\Interceptor */
$currentInterceptor = $this->advices[$this->current++];
return $currentInterceptor->invoke($this);
}
// Rebind the closure if scope (class name) was changed since last time
if ($this->previousScope !== $this->instance) {
if ($this->closureToCall === null) {
$this->closureToCall = $this->getStaticInvoker($this->className, $this->reflectionMethod->name);
}
$this->closureToCall = $this->closureToCall->bindTo(null, $this->instance);
$this->previousScope = $this->instance;
}
$closureToCall = $this->closureToCall;
return $closureToCall($this->arguments);
}