Update a setting

@param $scope
@param $key
@param $value
@return mixed
172204
public static function set($scope, $key, $value)
    {
        $settingStore = Store::get('Setting');
        $setting = $settingStore->getByScopeKey($scope, $key);
        $setting->setValue($value);
        $settingStore->save($setting);

        self::load();
    }
1183733
public function delete($key, $scope = null)
    {
        if ($scope === null) {
            $scope = $this->getScope();
        }

        return $this->getContainer()->delete($key, $scope);
    }
852057
public function set($key, $value) {

        $value = $this->connection->quote(json_encode($value, JSON_NUMERIC_CHECK));

        if($this->exists($key)) {
            $sql = "UPDATE ".$this->table." SET `keyval`={$value} WHERE `key`='{$key}'";
        } else {
            $sql = "INSERT INTO ".$this->table." (`key`,`keyval`) VALUES ('{$key}',{$value})";
        }

        $this->connection->exec($sql);
    }
1120919
protected function _methods($key, $scope) {
        return $this->cache($key, function() use ($scope) {
            $methods = [];

            foreach ($this->reflection()->getMethods($scope) as $method) {
                $methods[] = $method->getName();
            }

            return $methods;
        });
    }
1219778
public function with($key, $value = null)
    {
        $values = (is_array($key) || $key instanceof Traversable) ? $key : [$key => $value];

        return $this->copy()->update($values);
    }
1355718
public function set($key, $value)
    {
        $setting = SettingModel::create(
            [
                'key' => $key,
                'value' => $value,
            ]
        );

        return $setting ? $value : false;
    }
1147301
public function setValue($key, $value)
    {
        $this->loadSettingsIfNotDoneYet();

        $this->isDirty = true;
        $this->settingsValues[$key] = $value;
    }
1050406
public function setSetting($key, $value = null)
    {
        $this->getSettingsComponent()->set($this->getSettingsCategory(), $key, $value);
    }
996373
public static function setVar($key, $value)
    {
        $var = new Vars($key);
        $var->key = $key;
        $var->value = $value;
        return $var->save();
    }
1075992
function update (key, scopes, callback) {
    const unlock = lock(key)

    get(key, function (err, account) {
      if (err) {
        unlock()
        return callback(err)
      }

      account.scopes = scopes

      db.put(key, account, function (err) {
        unlock()
        if (err) return callback(err)
        else callback(null, account)
      })
    })
  }
733464
public function settingsSet($key, $value)
    {
        $allSettings = $this->settingsGetAll();
        $allSettings[$key] = $value;
        $this->settingsSetAll($allSettings);
    }
454469
function setScope($scope)
    {
        $scopes = array_merge($this->getScopes(), array( (string) $scope) );
        $this->setScopes($scopes);
        return $this;
    }
637412
public static function set(string $key, $value)
    {
        return self::getViewHelper()->getView()->addValue($key, $value);
    }
1109766
public function set($key, $value)
    {
        $parts = explode('.', $key);
        //loop through each part, create it if not present.
        $scope = &$this->array;
        $count = count($parts) - 1;
        for ($i = 0; $i < $count; $i++) {
            if (!isset($scope[$parts[$i]])) {
                $scope[$parts[$i]] = array();
            }
            $scope = &$scope[$parts[$i]];
        }
        $scope[$parts[$i]] = $value;

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

        return setcookie($key, $value);
    }
578130
public function addConfig($name, $value, $scope = null)
    {
        return $this->setConfig($name, $value, $scope);
    }
1162176
public static function set($key, $value){
        $oSystemSetting = SystemSettingsQuery::create()->findOneBy("key",$key);
        $oSystemSetting->setKey($key);
        $oSystemSetting->setValue($value);
        $oSystemSetting->save();
        return $value;
    }