Adds a new key/value pair at the list of keys; overwrites existing key
Note: if the key already exists, only the value is updated
@param mixed $key
@param mixed $value
@throws SimpleOrderedMapException
@return $this
192100
public function set($key, $value) {
    if ($this->exists($key)) {
      $index = $this->getKeyPosition($key);
      $this->values[$index] = $value;
      return $this;
    }
    return $this->add($key, $value);
  }
130873
public function push($key, $value)
    {
        $oldItems = $this->lastItems;

        $this->lastItems = array(
            $key => $value
        );

        if ($oldItems) {
            $this->lastItems = $this->lastItems + $oldItems;
        }

        return $this;
    }
171030
public function set($key, $value)
    {
        DotArray::set($this->getStorage(), $key,$value);

        return $this;
    }
1094852
public function addOption($key, $value)
    {
        $this->options[$key] = $value;
        $this->mongoCursor->addOption($key, $value);
        return $this;
    }
318103
public function add($key, $value)
    {
        if (!$key) {
            return $this;
        }

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

        return $this;
    }
683427
public function set($key, $value)
    {
        array_set($this->config, $key, $value);
        $this->persist();

        return $this;
    }
143892
public function add($key, $value = null)
    {
        if (is_array($key)) {
            foreach ($key as $innerKey => $innerValue) {
                Arr::set($this->variables, $innerKey, $innerValue);
            }
        } elseif ($key instanceof Closure) {
            $this->variables[] = $key;
        } else {
            Arr::set($this->variables, $key, $value);
        }

        return $this;
    }
796613
public function append(string $key, $value)
    {
        $this->content->put($key, $value);

        return $this;
    }
590753
public function set($key, $value) {
        if ($key) {
            $this->_data[$key] = $value;
        } else {
            $this->_data = $value;
        }
        $this->_modified = true;
        return $this;
    }
1361098
public function add(string $name, ?string $key, $value): self
    {
        if (!isset($this->_data[$name])) {
            $this->_data[$name] = [];
        }

        if ($key === null) {
            $key = count($this->_data[$name]);
        }

        $this->_data[$name][$key] = $value;

        return $this;
    }
694330
public function add($key, $value){
        if( $this->exists($key) ){
            throw new Exception("Item already exists in storage ($key)  ($this->name)");
        }
        $this->storage[$key] = $value;
        return $this->storage[$key];

    }
1076593
public function setParameter($key, $value)
    {
        if (!$this->parameters) {
            $this->parameters = array();
        }

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

        return $this;
    }
181601
public function set($key, $value = null)
    {
        $key = $this->resolveAlias($key);

        $mutator = 'set' . $this->toCamelCase($key) . 'Value';

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

        return $this;
    }
962877
public function add($key, $value)
    {
        if (empty($key)) return false;

        if (empty($this->engineVarList->$key)) {
            $this->engineVarList->$key = $value;

            return $this;
        }

        if (is_array($this->engineVarList->$key)) {
            array_merge($this->engineVarList->$key, $value);
        }

        return $this;
    }
418009
public function put($key, $value = '')
    {
        Arr::set($this->attributes, $key, $value);

        return $this;
    }
238139
public function addIfNotEmpty($key, $value)
    {
        if (empty($value)) {
            return $this;
        }

        return $this->add($key, $value);
    }
1335879
public function updateCounter($key, $value)
    {
        $this->update->updateCounter($key, new CounterOp($value));

        return $this;
    }