Set specified collection item.

@param  mixed $key   The item key.
@param  mixed $value The item value.

@return $this
340608
public function set($key, $value)
    {
        $key = $this->normalizeKey($key);

        if (null === $key) {
            $this->data[] = $value;
        } else {
            $this->data[$key] = $value;
        }

        return $this;
    }
555999
public static function set($key, $value)
    {
        if (is_array($key)) {
            $now = self::self()->getContainer()['settings'];
            foreach ($key as $item) {
                $now = $now[$item];
            }
            $now = $value;
        } else {
            $settings = self::self()->getContainer()['settings'];
            $settings[$key] = $value;
        }
    }
861634
public function set($key, $value)
    {
        $this->checkRestriction($value);

        if (!is_null($key)) {
            $this->value[$key] = $value;
        } else {
            $this->value[] = $value;
        }

        return $this;
    }
899005
protected function setConfig($value, $key)
    {
        $setter = 'set' . ucfirst($key);

        if (method_exists($this, $setter)) {
            $this->$setter($value);
        } elseif (property_exists($this, $key)) {
            $this->$key = $value;
        }

        return $this;
    }
679499
public function set($key, $value)
    {
        $this->assertElementIsOfType($value);

        $this->collection->set($key, $value);
    }
698147
public function set($key, $value = null)
    {
        $data = is_array($key) ? $key : [$key => $value];
        $obj = self::instance();
        $obj->fill($data);
        return $obj->save();
    }
1151340
public function set($key, $value)
    {
        $allowed = array_diff(array_keys(get_class_vars(get_class($this))), $this->_hidden);
        if (empty($allowed) || !empty($allowed) && in_array($key, $allowed)) {
            if (method_exists($this, 'set' . ucfirst($key))) {
                call_user_func_array([$this, 'set' . ucfirst($key)], [$value]);
            } else {
                $this->{$key} = self::modelize($key, $value);
            }
        }

        return $this;
    }
18183
public function set($key, $value)
    {
        $this->keys[$key] = true;
        $this->archive[$key] = $value;
    }
646878
public function set(string $key, $value): self
    {
        Arr::set($this->data, $key, $value, true);
        return $this;
    }
383269
public function set($key, $value)
    {
        $cont = clone $this;
        $cont->setParameter($key, $value);

        return $cont;
    }
974531
public function set($key, $value = null)
    {
        if ($key === null) {
            array_push($this->storage, $value);

            return $this;
        }

        if (is_array($key)) {
            foreach ($key as $key => $value) {
                $this->storage[$key] = $value;
            }

            return $this;
        }

        $this->setValueToStack($this->storage, explode(self::SEPARATOR, $key), $value);

        return $this;
    }
714182
function set($key, $value) {
        if(!$this->enabled) {
            return $this;
        }
        
        parent::set($key, $value);
        if($this !== $this->client->presences) {
            $this->client->presences->set($key, $value);
        }
        
        return $this;
    }
1021094
public function prependSet($key, $value): ArrayCollection
    {
        $this->items = [$key => $value] + $this->items;

        return $this;
    }
920234
public function set($key, $value)
    {
        if ($key === null && is_object($value)) {
            $key = spl_object_hash($value);
        }

        $this->data[$key] = $value;

        return $this;
    }
19913
public function set($key, $value)
    {
        $keys = explode('.', $key);

        $data = &$this->parameters;

        while (count($keys) > 1) {
            $pkey = $keys[0];

            if (!array_key_exists($pkey, $data) || !is_array($data[$pkey])) {
                $data[$pkey] = [];
            }

            $data = &$data[$pkey];
            array_shift($keys);
        }

        $data[$keys[0]] = $value;

        return $this;
    }
1162148
public function set($key, $value)
    {
        $this->nestedKeyCache = [];

        if ($this->isNestedKey($key)) {
            $this->setNestedValueByKey($key, $value);

            return;
        }

        $this->items[$key] = $value;
    }
470713
public function set( $key, $value ) {
		$key = $this->addKeyprefixIfNeeded( $key );
		$this->params[$key] = $value;
		return $this;
	}