Access object like an associative array.

@api

@param string $offset Key subfield
330280
public function offsetSet($offset, $value)
    {
        switch ($offset) {
            case 'indicator': $this->addIndicator($value);
            break;
            case 'subfields': $this->addSubfields($value);
            break;
            default: throw new \UnexpectedValueException("Offset $offset cannot be set.");
        }
    }
755971
public function offsetSet($offset, $value)
    {
        if (is_null($offset)) {
            $this->data[] = $value;
        } else {
            $this->data[$offset] = $value;
        }

        $this->keys = array_keys($this->data);
    }
547424
public function offsetGet($offset)
    {
        if ($this->gettersVariable) {
            $var = $this->gettersVariable;

            return $this->{$var}[$offset] ?? null;
        }

        return $this->{$offset} ?? null;
    }
589094
public function offsetGet($offset)
    {
        if ($offset instanceof UniqueId) {
            $offset = $offset->id();
        }

        return $this->elements->offsetGet($offset);
    }
157515
public function offsetGet($offset)
    {
        $offset = (int) $offset;
        if ($offset < 0 || $offset >= $this->_count) {
            throw new Kwf_Exception("Illegal index $offset");
        }
        $this->_pointer = $offset;

        return $this->current();
    }
277914
public function offsetGet($offset)
    {
        $method = 'get' . ucfirst($offset);
        if (method_exists($this, $method)) {
            return $this->{$method} ();
        }
        $method = 'get' . self::matchPropertyName($offset);
        if (method_exists($this, $method)) {
            return $this->{$method} ();
        }
        return array_key_exists($offset, $this->unknownProperties) ? $this->unknownProperties[$offset] : null;
    }
323304
public function offsetGet($offset)
    {
        if (!is_int($offset)) {
            $offset = array_search($offset, self::$reverseLookup);
        }

        return self::$references[$offset];
    }
831808
public function offsetSet($offset, $value)
    {
        if (is_null($offset)) {
            $offset = $this->count();
        }
        $this->set($offset, $value);
    }
726234
public function offsetGet($offset)
    {
        $value = parent::offsetGet($offset);

        if (\is_array($value)) {
            $value = \call_user_func([$this->class, 'create'], $value);
        }

        return $value;
    }
539542
public function offsetUnset($offset)
    {
        $keys = explode($this->keySeparator, $offset);

        $keyCount = count($keys);

        $array = &$this->values;

        while ($keyCount > 1) {
            $key = array_shift($keys);

            if (isset($array[$key]) && is_array($array[$key])) {
                $array = &$array[$key];
            }

            --$keyCount;
        }

        unset($array[array_shift($keys)]);
    }
1009667
public function offsetUnset($offset)
    {
        $keys = is_array($offset) ? $offset : explode('.', $offset);
        if (!$keys) {
            return;
        }

        $name = array_shift($keys);

        if ($keys) {
            if (!array_key_exists($name, $this->_data)) {
                return false;
            }
            $value = $this->_data[$name];
            if ($value instanceof ArrayAccess) {
                $value->offsetUnset($keys);
            }
            return;
        }
        $this->_skipNext = (integer) $name === key($this->_data);

        if (!array_key_exists($name, $this->_data)) {
            return;
        }

        $value = $this->_data[$name];
        unset($this->_data[$name]);
        if ($value instanceof HasParentsInterface) {
            $value->unsetParent($this);
        }
        $this->_modified = true;
    }
95712
public function offsetGet($offset)
    {
        return array_key_exists($offset, $this->attributes) ? $this->attributes[$offset] : null;
    }
497185
public function offsetSet($offset, $value)
    {
        if(is_null($offset)) {
            $offset = $this->index;
            $this->index++;
        }
        $this->indexItem = array_push($this->keys, $offset);
        $this->{$offset} = $value;
    }
292389
public function offsetGet($offset)
    {
        $file = $this->fileOfKey($offset);
        return $this->serializer->deserialize($this->filesystem->read($file));
    }
125426
protected function loadData($offset)
    {
        if (!$this->loaded && !$this->isNew) {
            if (is_numeric($offset) || is_null($offset)) {
                $this->findAll();
            } else {
                $this->find();
            }
        }
    }
1119961
public function offsetGet($offset) {
        $value = parent::offsetGet($offset);
        return $offset === "context" ? $value : $this->initChild($offset, $value);
    }
752695
public function offsetGet($offset)
    {
        if ($this->offsetExists($offset)) {
            $values = get_object_vars($this);
            return $values[$offset];
        }

        return null;
    }