Sets an item at the given index.

@param string|integer $offset The offset to assign the value to.
@param mixed          $value  The value to set.

@throws \InvalidArgumentException if the key is null or an empty string.
484611
public function offsetSet($offset, $value)
    {
        if ($offset === '' || $offset === null) {
            throw new \InvalidArgumentException('The key of a collection must always be set');
        }

        $this->items[$offset] = $value;
    }
784814
public function offsetSet($offset, $value)
    {
        if (!$value instanceof Author) {
            throw new InvalidArgumentType(
                '$value',
                'eZ\\Publish\\Core\\FieldType\\Author\\Author',
                $value
            );
        }

        $aAuthors = $this->getArrayCopy();
        parent::offsetSet($offset, $value);
        if (!isset($value->id) || $value->id == -1) {
            if (!empty($aAuthors)) {
                $value->id = end($aAuthors)->id + 1;
            } else {
                $value->id = 1;
            }
        }
    }
857011
public function offsetSet($offset, $value)
    {
        if ($this->allowNullValue === true || null !== $value) {
            if (null === $offset) {
                $this->collection[] = $this->resolveString($value, __METHOD__);
            } else {
                $this->collection[$offset] = $this->resolveString($value, __METHOD__);
            }
        }
    }
761320
public function offsetSet($offset, $value)
    {
        $offset = trim(strval($offset));

        if (!$this->getField($offset)->validate($value)) throw new \InvalidArgumentException($offset . ' validation failed.');
        if ($value !== parent::offsetGet($offset)) $this->modified = true;

        parent::offsetSet($offset, $value);
    }
273987
public function offsetSet($offset, $value)
    {
        $this->loadData($offset);
        $this->set($offset, $value);
    }
1096463
public function offsetSet($offset, $value)
    {
        if (is_null($offset)) {
            $this->items[] = $value;
        } else {
            $this->items[$offset] = $value;
        }

        $this->keys = array_keys($this->items);
    }
799583
public function offsetSet($offset, $value)
    {
        $value = trim($value);

        if ( ! empty($value)) {
            parent::offsetSet($offset, $value);
        }
    }
854716
public function offsetSet($offset, $value): void
    {
        if (false === $this->checkType($this->getKeyType(), $offset)) {
            throw new InvalidArgumentException(
                'Key must be of type ' . $this->getKeyType() . '; key is '
                . $this->toolValueToString($offset)
            );
        }

        if (false === $this->checkType($this->getValueType(), $value)) {
            throw new InvalidArgumentException(
                'Value must be of type ' . $this->getValueType() . '; value is '
                . $this->toolValueToString($value)
            );
        }

        parent::offsetSet($offset, $value);
    }
818090
public function offsetSet($offset, $value)
    {
        if (\is_string($offset) || \is_int($offset)) {
            $this->properties[$offset] = $value;
        }
    }
1364152
public function offsetSet ( $offset , $value ){
            if($value instanceof \NonDB\Data){
                $value = $value->getArray();
            }
            $this->data[$offset] = $value;
        }
86957
public function offsetSet($offset, $value)
    {
        if (!$this->isCollection()) {
            $this->forceCollection();
        }
        if ($this->offsetExists($offset) || $offset === \count($this->data)) {
            $this->data[$offset] = $this->unbox($value);
        } else {
            throw new InvalidOffsetException('Invalid offset: '.$offset);
        }
    }
539285
public function offsetSet($offset, $value) {
        parent::offsetSet($offset, $value);
        $this->initChild($offset, $value, TRUE);
    }
870690
public function offsetSet($offset, $value)
    {
        $this->{$this->property($offset)} = $this->checkType($value);
    }
1202108
public function offsetSet($offset, $value)
    {
        if (is_null($offset)) {
            $this->items[] = $this->normalizeValue($value);
        } else {
            $this->items[$this->normalizeKey($offset)] = $this->normalizeValue($value);
        }
    }
557300
public function offsetSet($offset, $value)
    {
        if (!($value instanceof \Erebot\Interfaces\Event\Match)) {
            throw new \Erebot\InvalidValueException('Not a valid matcher');
        }
        $this->submatchers[$offset] = $value;
    }
306805
public function offsetSet($offset, $value)
	{
		if ($offset === null)
		{
			// $list[] = 'foo' maps to $list->append('foo')
			$this->append($value);
		}
		else
		{
			// Use the default implementation
			parent::offsetSet($offset, $value);
		}
	}
70705
public function offsetSet($offset, $value)
    {
        if (is_null($offset)) {
            $this->container[] = $value;
        } else {
            $this->container[$offset] = $value;
            if (is_numeric($offset)) {
                $this->length = (int)$offset;
            }
        }
    }