Go\Aop\Framework\ClassFieldAccess::__invoke PHP Method

__invoke() final public method

Invokes current field access with all interceptors
final public __invoke ( object $instance, integer $accessType, mixed &$originalValue, mixed $newValue = NAN ) : mixed
$instance object Instance of object
$accessType integer Type of access: READ or WRITE
$originalValue mixed Original value of property
$newValue mixed New value to set
return mixed
    public final function &__invoke($instance, $accessType, &$originalValue, $newValue = NAN)
    {
        if ($this->level) {
            array_push($this->stackFrames, [$this->instance, $this->accessType, &$this->value, &$this->newValue]);
        }
        ++$this->level;
        $this->current = 0;
        $this->instance = $instance;
        $this->accessType = $accessType;
        $this->value =& $originalValue;
        $this->newValue = $newValue;
        $this->proceed();
        --$this->level;
        if ($this->level) {
            list($this->instance, $this->accessType, $this->value, $this->newValue) = array_pop($this->stackFrames);
        }
        if ($accessType == self::READ) {
            $result =& $this->value;
        } else {
            $result =& $this->newValue;
        }
        return $result;
    }