Sculpin\Contrib\ProxySourceCollection\ProxySourceItem::offsetSet PHP Method

offsetSet() public method

public offsetSet ( $offset, $value )
    public function offsetSet($offset, $value)
    {
        if (is_null($offset)) {
            throw new \InvalidArgumentException('Proxy source items cannot have values pushed onto them');
        } else {
            if (method_exists($this, $offset)) {
                return call_user_func(array($this, $offset, $value));
            }
            $setMethod = 'set' . ucfirst($offset);
            if (method_exists($this, $setMethod)) {
                return call_user_func(array($this, $setMethod, $value));
            }
            $this->data()->set($offset, $value);
        }
    }