Set.

@param string $key
@param mixed $value
@param string $app Default null which means default app '*'.
@throws ConfigException
970140
public static function set(string $key, $value, ?string $app = null): void
    {
        self::repository($app)->set($key, $value);
    }
1099183
public static function set(string $key, $value)
    {
        return self::getInstance()->getConfig()->set($key, $value);
    }
1202588
public function set($key, $value)
    {
        if (!$key)
        {
            throw new Exception('key may not be null.');
        }
        if (is_array($value))
        {
            throw new Exception('Must use setArray() or setAssociativeArray() for this value.');
        }
        $this->_performOperation($key, new SetOperation($value));
    }
1283263
public function setOption($key, $value = null)
    {
        $name = $this->current ?: 'default';

        if (is_array($key)) {
            $this->configs[$name]['options'] = array_merge($this->configs[$name]['options'], $key);
        } else {
            $this->configs[$name]['options'][$key] = $value;
        }
    }
789466
public function addAppData(string $key, $value = null): void
    {
        $this->_additionalAppData[$key] = $value;
    }
740681
public function setValueByKey($key, $value)
    {
        $model = Configuration::whereConfigurationKey($key)->first();

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

        return $model;
    }
716004
public function setConfig($key = null, $value = null)
    {
        if ($key == null || $value == null) {
            return null;
        }
        return ($this->config[$key] = $value);
    }
216808
public function setConfig($data, $value) {
        if (is_string($data)) {
            $this->_config[$data] = $value;
        } else {
            throw new ConfigException("Error while setting a config value");
        }
    }
239830
public function setConfig($key, $value)
    {
        if (! is_object($value) || ! $value instanceof ConfigurableService) {
            $value = new ConfigurationService(array(ConfigurationService::OPTION_CONFIG => $value));
        }
        $value->setHeader($this->getConfigHeader($key));
        $this->registerService($this->getId().'/'.$key, $value);
        return true;
    }
517499
public function set(string $key, $value): void
	{
		[$file] = $this->parseKey($key);

		if(!isset($this->configuration[$file]))
		{
			$this->load($file);
		}

		Arr::set($this->configuration, $key, $value);
	}
918027
protected function setKey($key, $value)
    {
        if ($key == $this->_keyName) {
            $this->_keyValue = $value;
            $this->_key['value'] = $value;
        }
    }
57885
public function set($key, $value)
    {
        if (empty($key)) {
            throw new Exception("Key must be set");
        }

        $parts = array_reverse(explode(".", $key));
        $file = array_pop($parts);

        // we'll try to load a configuration file (if exists)
        if (!isset($this->registry[$file])) {
            $this->registry[$file] = $this->discover($file);
        }

        foreach ($parts as $part) {
            $value = array($part => $value);
        }

        if (is_array($this->registry[$file]) && (is_array($value))) {
            $this->registry[$file] = array_replace_recursive($this->registry[$file], $value);
        } else {
            $this->registry[$file] = $value;
        }
    }
1230280
public function set($key, $value, $exp = 0, $onResponse = null)
    {
        $this->getConnectionByKey($key, function ($conn) use ($key, $value, $exp, $onResponse) {
            if (!$conn->connected) {
                return;
            }
            if ($onResponse !== null) {
                $conn->onResponse->push($onResponse);
                $conn->checkFree();
            }

            $conn->writeln(
                'set ' . $this->config->prefix->value . $key . ' 0 ' . $exp . ' '
                . mb_orig_strlen($value) . ($onResponse === null ? ' noreply' : '') . "\r\n" . $value
            );
        });
    }
511721
public function setValue($key, $value)
    {
        $this->langstrings[$key] = $value;
        $this->debug('SetValue ' . $key . ' => ' . $value);
    }
1147301
public function setValue($key, $value)
    {
        $this->loadSettingsIfNotDoneYet();

        $this->isDirty = true;
        $this->settingsValues[$key] = $value;
    }
168880
public static function set(string $key, $value)
    {
        // Start session if needed
        if (! session_id()) {
            self::start();
        }

        // Set key
        $_SESSION[(string) $key] = $value;
    }
831891
public function set(string $key, $value)
    {
        $key = $this->security->normalize($key);
        $value = $this->security->normalize($value);
        parent::set($key, $value); // TODO: Change the autogenerated stub
        $_SESSION[$key] = $value;
    }