nspl\ds\Set::offsetSet PHP Метод

offsetSet() публичный Метод

(PHP 5 >= 5.0.0)
Offset to set
public offsetSet ( integer $index, mixed $value ) : void
$index integer

The offset to assign the value to.

$value mixed

The value to set.

Результат void
    public function offsetSet($index, $value)
    {
        if (null === $index) {
            $this->array[static::getElementKey($value)] = $value;
        } else {
            throw new \BadMethodCallException('Set does not support indexing');
        }
    }