update option value.

@param $key
@param $value
@param $group
@return $this|void
353812
public function update($key, $value, $group = self::DEFAULT_GROUP) {
        $this->settings[$group][$key] = $value;

        return $this;
    }
466509
function updateKey($key, $value)
    {
        return tap($this->read(), function (&$config) use ($key, $value) {
            $config[$key] = $value;

            $this->write($config);
        });
    }
28867
public function withOption(string $key, $value): Element
    {
        $this->options[$key] = $value;

        return $this;
    }
1358846
public function setOption($key, $value)
    {
        if (is_array($value)) {
            $this->options[$key] = array_merge($this->options[$key], $value);
        } else {
            $this->options[$key] = $value;
        }
        
        return $this;
    }
198784
public function set($key, $value)
    {
        $this->checkPermissions(
            $key,
            array_key_exists($key, $this->scope)
                ? self::ACTION_MODIFY
                : self::ACTION_CREATE
        );
        $this->scope[$key] = $value;
    }
404761
public function updateValue($group, $variableCode, $newValue)
    {
        $variable = clone $this->getVariable($variableCode);
        $variable->setValue($newValue);

        if (!isset($this->queuedForUpdate[$group->getName()])) {
            $this->queuedForUpdate[$group->getName()]['time'] = microtime(true);
        }

        $checkVariable = clone $this->checkVariable;
        $uniqueId = uniqid('exp_', true);
        $checkVariable->setValue("\"$uniqueId\"");

        $this->checkWindow->setValue(Builder::escapeText(get_called_class()));
        $this->queuedForUpdate[$group->getName()]['group'] = $group;
        $this->queuedForUpdate[$group->getName()]['variables'][$variableCode] = $variable;
        $this->queuedForUpdate[$group->getName()]['check'] = $checkVariable;
    }
843927
public function set($key, $value)
	{
		if ( !($value instanceof Option) )
		{
			throw new InvalidArgumentException('Only Options can be added to an Optgroup.');
		}

		return parent::set($key, $value);
	}
65980
public function setOption(string $key, $value): void
    {
        if (array_key_exists($key, $this->options)) {
            $this->options[$key] = $value;

            return;
        }

        throw new Exception('Invalid option key "' . $key . '".', Exception::INVALID_OPTION);
    }
1265924
public function setOption($key, $value=null)
    {
        if (is_array($key)) {
            $opts = static::_parseOptions($key);
            $this->options = array_merge($this->options, $opts);
        } else {
            $options = static::_parseOptions([$key => $value]);
            $this->options = array_merge($this->options, $opts);
        }
        
        return $this;
    }
654783
public function updateWithOption($key, $option, $value)
    {
        if ($this->hasOption($key, $option)) {
            $this->container[$key][$option] = $value;
        }

        return $this;
    }
581382
public function setGroup($group)
	{
	    if ($this->options['group']) {
	        $group = str_replace('//', '/', $this->options['group'] . '/' . $group);
	    }
	    
	    return $this->setOption('group', $group);
	}
299093
public static function setExtraCurlOption($key, $value)
    {
        phpCAS :: traceBegin();
        phpCAS::_validateClientExists();

        self::$_PHPCAS_CLIENT->setExtraCurlOption($key, $value);
        phpCAS :: traceEnd();
    }
587607
public static function SetGroupValue($group, $option, $value)
    {
        self::CheckBackend();

        self::$backend->SetGroupValue($group, $option, $value);
    }
1219767
protected function doSet($key, $grouping, $value)
    {
        //  Check that it's a valid key/grouping pair
        if (!isset($this->notifications[$grouping]->options[$key])) {
            $this->setError($grouping . '/' . $key . ' is not a valid group/key pair.');
            return false;
        }

        // --------------------------------------------------------------------------

        $oDb = Factory::service('Database');
        $oDb->where('key', $key);
        $oDb->where('grouping', $grouping);
        if ($oDb->count_all_results($this->table)) {
            $oDb->where('grouping', $grouping);
            $oDb->where('key', $key);
            $oDb->set('value', json_encode($value));
            $oDb->update($this->table);
        } else {
            $oDb->set('grouping', $grouping);
            $oDb->set('key', $key);
            $oDb->set('value', json_encode($value));
            $oDb->insert($this->table);
        }
    }
849913
public function set($key, $value = null)
    {
        list($namespace, $group, $item) = $this->parseKey($key);

        $collection = $this->getCollection($group, $namespace);

        // We'll need to go ahead and lazy load each configuration groups even when
        // we're just setting a configuration item so that the set item does not
        // get overwritten if a different item in the group is requested later.
        $this->load($group, $namespace, $collection);

        if ($item === null) {
            $this->items[$collection] = $value;
        } else {
            array_set($this->items[$collection], $item, $value);
        }
    }
1052596
public function update( $key, $value = '', $expiry = '' ) {
		if ( $this->is_option ) {
			return $this->update_option( $key, $value, $expiry );
		}
		return true;
	}
1318259
public function update($key, $value, $group = self::DEFAULT_GROUP) {
        $this->repository->updateOrCreate($key, [
            'value' => $value,
            'group' => $group
        ]);

        return true;
    }