Set a given configuration value.

@param  string  $key
@param  mixed   $value
@param  bool    $load

@return void
486256
protected function setSingleItem($key, $value = null, $load = true)
    {
        list($namespace, $group, $item) = $this->parseKey($key);

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

        if ($load) {
            $this->load($group, $namespace, $collection);
        }

        if (is_null($item)) {
            $this->items[$collection] = $value;
        } else {
            Arr::set($this->items[$collection], $item, $value);
        }
    }
740681
public function setValueByKey($key, $value)
    {
        $model = Configuration::whereConfigurationKey($key)->first();

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

        return $model;
    }
700670
public static function set($key, $value)
    {
        self::$config[$key] = $value;

        // Check if we need to register the Annotations
        if (!self::$registered) {
            AnnotationRegistry::registerFile(__DIR__ . '/Structure/SweetAnnotations.php');
            self::$registered = true;
        }
    }
338012
public function setCache($key, $value) {
        if($this->cacheEnabled) {
            $this->cacheObj->save($key, $value);
        }
    }
141745
public static function set($key, $value) {
		$memcached = self::connect();
		$config = \Skeleton\Object\Config::$cache_handler_config;
		$memcached->add($key, $value, $config['expire']);
	}
690131
public function set($key, $value, $save = true)
    {
        $this->load();
        NestedArrayUtil::setNestedArrayValue($this->state, explode('.', $key), $value);
        if ($save) {
            $this->save();
        }
    }
702436
public function setBoth($key, $value = null): void
    {
        $this->_controller->set($key, $value);
        $this->setJson($key, $value);
    }
599155
public function set(string $key, $value)
    {
        if (!isset($this->data[$this->activeAssetSourceIdentifier])) {
            $this->initializeData($this->activeAssetSourceIdentifier);
        }
        $this->data[$this->activeAssetSourceIdentifier][$key] = $value;
    }
916203
public function set($key, $value)
    {
        $connection = Yii::$app->db;

        if (isset($this->settings[$key])) {
            $connection->createCommand()->update('settings', ['value' => $value])->execute();
        } else {
            $connection->createCommand()->insert('settings', [
                'key' => $key,
                'value' => $value,
            ])->execute();
        }

        $this->settings[$key] = $value;
    }
1011641
public function setConfig($key, $value)
    {
        if (!array_key_exists($key, $this->configuration)) {
            throw new \Exception(
                sprintf('key "%s" does\'t exist', $key)
            );
        }

        $this->configuration[$key] = $value;
    }
206837
public function setConfig(string $name, $value): void
    {
        if (array_key_exists($name, $this->configs)) {
            $this->configs[$name] = $value;
        }
    }
1357525
public function set($key, $value) {
		if (null === $key) {
			$this->_data[] = $value;
		} else {
			$this->_data[$key] = $value;
		}
	}
198522
public function setByKey($key, $value)
    {
        $storage = $this->getStorage();
        if ($value !== '' && $value !== null) {
            $storage[$key] = $value;
        } else {
            unset($storage[$key]);
        }
        $this->setStorage($storage);
    }
725731
public static function set($key, $value = false)
    {

        /**
         * Check whether session is set in array or not
         * If array then set all session key-values in foreach loop
         */

        self::setPrefix();

        if (is_array($key) && $value === false) {

            foreach ($key as $name => $value) {
                $_SESSION[self::$_sessionPrefix . $name] = $value;
            }

        } else {
            $_SESSION[self::$_sessionPrefix . $key] = $value;
        }

    }
1355718
public function set($key, $value)
    {
        $setting = SettingModel::create(
            [
                'key' => $key,
                'value' => $value,
            ]
        );

        return $setting ? $value : false;
    }
420850
public function setConfig($name, $key, $value)
    {
        $backup = $this->getDriver()->configGet($name, $key);
        $this->getDriver()->configSet($name, $key, $value);
        if (!array_key_exists($name, $this->config)) {
            $this->config[$name][$key] = $backup;
            return;
        }

        if (!array_key_exists($key, $this->config[$name])) {
            $this->config[$name][$key] = $backup;
        }
    }
435643
public function setConfigVariable($key, $value)
    {

        if (!$key) {
            return false;
        }

        $this->setting->$key = $value;

        return $this;
    }