@param string $key
@param mixed  $value
@param string $feature

@return $this
508064
public function set($key, $value, $feature = null)
    {
        $this->values[$key] = $value;

        if ($feature) {
            $this->addFeature($feature);
        }

        return $this;
    }
740681
public function setValueByKey($key, $value)
    {
        $model = Configuration::whereConfigurationKey($key)->first();

        if (null === $model) {
            return null;
        }
        $model->update(['configuration_value' => $value]);

        return $model;
    }
290020
public function set($key, $value)
	{
		Arr::set($this->body, $key, $value);

		return $this;
	}
51147
public <T> Governator setFeature(GovernatorFeature<T> feature, T value) {
        this.featureOverrides.put(feature, value);
        return this;
    }
518530
public function set($key, $value = null) {

        // Do not trigger state changes for relations
        if (!$this->hasRelation($key)) {

            // Only flag changed if the value is different
            if ($value != $this->get($key) && !in_array($key, $this->reserved)) {
                $this->_changed = true;
            }

            // Run the value through a mutator but do not set the mutator key
            if ($method = $this->hasMutator($key)) {
                $this->{$method}($value);

                return $this;
            }
        }

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

        return $this;
    }
229411
public function setAttribute($key, $value)
    {
        if ($value === null) {
            unset($this->attributes[$key]);
        } else {
            $this->attributes[$key] = $value;
        }

        return $this;
    }
383269
public function set($key, $value)
    {
        $cont = clone $this;
        $cont->setParameter($key, $value);

        return $cont;
    }
700027
public function set($key, $value)
    {
        $this->session->set(self::BASE_KEY.'.'.$key, $value);

        return $this;
    }
556916
public function withAttribute(string $key, $value): ElementInterface
    {
        if ($key === 'value' && is_array($value)) {
            foreach ($this->elements as $name => $element) {
                $this->elements[$name]->withValue($value[$name] ?? '');
            }

            return $this;
        }

        parent::withAttribute($key, $value);

        return $this;
    }
265016
public function assign($key, $value = null)
    {
        if (! is_array($key) || $value instanceof Closure) {
            $this->vars[$key] = $value;
        } else {
            $this->vars = array_merge($this->vars, $key);
        }

        return $this;
    }
1027575
public function set($key, $value)
    {
        if (! $value instanceof EntityDescriptorInterface) {
            throw new InvalidArgumentException (
                "Invalid descriptor. DescriptorsCollection only accepts ".
                "EntityDescriptorInterface object."
            );
        }
        return parent::set($key, $value);
    }
803827
public function updateSet($key, $value)
    {
        $update = ( ! $value instanceof SetUpdate)
            ? SetUpdate::createFromArray($value)
            : $value;

        $this->update->updateSet($key, $update->getOp());

        return $this;
    }
1274865
public function filterFeature(FeatureNode $feature)
    {
        if ($this->isFeatureMatch($feature)) {
            return $feature;
        }

        $scenarios = array();
        foreach ($feature->getScenarios() as $scenario) {
            if (!$this->isScenarioMatch($scenario)) {
                continue;
            }

            $scenarios[] = $scenario;
        }

        return new FeatureNode(
            $feature->getTitle(),
            $feature->getDescription(),
            $feature->getTags(),
            $feature->getBackground(),
            $scenarios,
            $feature->getKeyword(),
            $feature->getLanguage(),
            $feature->getFile(),
            $feature->getLine()
        );
    }
55860
public function setPreference($key, $value)
    {
        if (isset(static::$preferences[$key])) {
            $preferences = $this->preferences;

            if (! is_null($transformer = static::$preferences[$key]['transformer'])) {
                $preferences[$key] = call_user_func($transformer, $value);
            } else {
                $preferences[$key] = $value;
            }

            $this->preferences = $preferences;
        }

        return $this;
    }
996373
public static function setVar($key, $value)
    {
        $var = new Vars($key);
        $var->key = $key;
        $var->value = $value;
        return $var->save();
    }
673930
public function setOption($key, $value)
    {

        $this->getTargetConfigurableObject()
            ->setOption($this->getOptionName($key), $value);

        return $this;
    }
186944
public function set(string $key, $value)
  {
    $keys = \explode('.',$key);
    $arr = &$this->confValues;
    $arrParent = null;

    # Walk the structure
    foreach ($keys as $key) {
      $arrParent = &$arr;
      $lastKey = $key;
      if (!isset($arr[$key])) {
        $arr[$key]=[];
      }
      $arr = &$arr[$key];
    }

    if (\is_null($value)) {
      unset($arrParent[$lastKey]); // delete the key
    } else {
      $arr = $value; // set the value in the original confArray
    }

    return $this;
  }