Sets configuration value of the given name.
Every change automatically updates the cache.
Set value to null to restore default one.
@param string $name configuration key
@param string $value configuration value
@return bool
320855
public function set($name, $value)
    {
        try {
            if (is_string($name) && (is_string($value) || $value === null)) {
                if ($value === null) {
                    if (!array_key_exists($name, $this->defaults)) {
                        return false;
                    }
                    $value = $this->defaults[$name];
                }
                if ((new Query)->from(static::tableName())->where(['name' => $name])->exists()) {
                    Podium::getInstance()->db->createCommand()->update(
                        static::tableName(), ['value' => $value], ['name' => $name]
                    )->execute();
                } else {
                    Podium::getInstance()->db->createCommand()->insert(
                        static::tableName(), ['name' => $name, 'value' => $value]
                    )->execute();
                }
                $this->cache->set('config', $this->notCached);
                $this->_config = null;
                return true;
            }
        } catch (Exception $e) {
            Log::error($e->getMessage(), null, __METHOD__);
        }
        return false;
    }
195418
public function setConfig($name, $value)
    {
        isset($this->config[$name]) && ($this->config[$name] = $value);
    }
256765
public function setSetting($name, $value = null)
    {
        $oldValue = $this->getSetting($name);
        if ($value != $oldValue) {
            if (!empty($value)) {
                $this->settings[$name] = $value;
            } else {
                unset($this->settings[$name]);
            }
            $this->settingsChanged = true;
        }
    }
80262
public function set( string $name, $value )
	{
		if( $name === "default" )
		{
			if( is_scalar($value) )
				$this->default = $value;
		}
		else if( $name !== "name" && isset($this->{$name}) && gettype($this->{$name}) === gettype($value) )
		{
			$this->{$name} = $value;
		}
		return $this;
	}
206837
public function setConfig(string $name, $value): void
    {
        if (array_key_exists($name, $this->configs)) {
            $this->configs[$name] = $value;
        }
    }
381961
protected function storeOriginalConfiguration($name, $value) {
    if (!isset($this->originalConfiguration[$name])) {
      $this->originalConfiguration[$name] = $value;
    }
  }
1248054
public function set_property( $name, $value ) {
		$property = $this->get_property( $name );

		$property->setValue( $value );

		return $property;
	}
115647
public function setConfigParam($name, $value)
    {
        if (isset($this->_aConfigParams[$name])) {
            $this->_aConfigParams[$name] = $value;
        } elseif (isset($this->$name)) {
            $this->$name = $value;
        } else {
            $this->_aConfigParams[$name] = $value;
        }
    }
1372117
public function setProperty($name, $value) {
        if ($this->configured) throw new IllegalStateException('Configuration is frozen');

        $this->properties[$name] = $value;
        return $this;
    }
550517
protected static function set(string $name, string $value): void
    {
        $name = \trim($name);

        if (
            (isset($name[0]) && $name[0] === '#') ||
            (static::$immutable && static::get($name) !== null)
        ) {
            return;
        }

        static::$names[] = $name;
        $value = \trim($value);

        // If PHP is running as an Apache module and an existing
        // Apache environment variable exists, overwrite it
        if (
            \function_exists('\\apache_setenv') &&
            \function_exists('\\apache_getenv') &&
            \apache_getenv($name) !== false
        ) {
            \apache_setenv($name, $value);
        }

        if (\function_exists('\\putenv')) {
            \putenv("$name=$value");
        }

        $_ENV[$name] = $value;
        $_SERVER[$name] = $value;
    }
5154
public function set($name, $value = null)
    {
        if (is_array($name)) {
            foreach ($name as $innerName => $innerValue) {
                $this->replace($innerName, $this->formatValue($innerValue));
            }
        } else {
            $this->replace($name, $this->formatValue($value));
        }

        // return is for chaining
        return $this;
    }
593475
public static function set($name,$value=null)
    {
        if(is_array($name)){
            self::$config=array_merge(self::$config,$name);
            return;
        }
        if(strstr($name,'.')===false){
            self::$config[$name]=$value;
        }else{
            list($l,$r)=explode('.',$name);
            self::$config[$l][$r]=$value;
        }
    }
643042
public function set($name, $value)
    {
        $name = $this->str($name);
        if ($name->contains('.')) {
            $keys = $name->trim('.')->explode('.', 2);

            if (!$this->data->keyExists($keys[0])) {
                $this->data[$keys[0]] = new ConfigObject();
            }

            $this->data[$keys[0]]->set($keys[1], $value);

            return $this;
        }

        $this->data->key($name, $value);

        return $this;
    }
1136457
public static function setEnv($name, $value = false)
    {
        $unset = false === $value;

        if (!putenv($unset ? $name : $name.'='.$value)) {
            return false;
        }

        if ($unset) {
            unset($_SERVER[$name]);
        } else {
            $_SERVER[$name] = $value;
        }
        return true;
    }
32371
public function setValue($name, $value)
    {
        unset($this->factories[$name]);
        $this->cache[$name] = $value;
    }
1073
public function set($name, $value = null)
    {
        if (is_array($name)) {
            $this->parameters = array_replace($this->parameters, $name);
        } else {
            $this->parameters[trim(strtolower($name))] = is_string($value) ? trim($value) : $value;
        }
    }
610989
public function setDefaultValue($name, $value)
    {
        if (!$this->hasParameter($name)) {
            $this->setParameter($name, $value);
        }

        return $this;
    }