pocketmine\nbt\tag\CompoundTag::offsetSet PHP Method

offsetSet() public method

public offsetSet ( $offset, $value )
    public function offsetSet($offset, $value)
    {
        if ($value instanceof Tag) {
            $this->{$offset} = $value;
        } elseif (isset($this->{$offset}) and $this->{$offset} instanceof Tag) {
            $this->{$offset}->setValue($value);
        }
    }