Settings

@param string|array $key null
@param string $value null
@return void
184465
public function set()
    {
        $args  = func_get_args();
        $count = func_num_args();

        if ( is_array($args[0]) )
        {
            foreach ($args[0] as $key => $value)
            {
                if ($key === 'path')
                {
                    $this->setPath($value);
                    continue;
                }

                if (property_exists($this, $key))
                {
                    $this->$key = $value;
                }
            }
        }
        elseif ($count === 2)
        {
            if ($args[0] === 'path')
            {
                $this->setPath($args[1]);
                return ;
            }

            if (property_exists($this, $args[0]))
            {
                $this[$args[0]] = $args[1];
            }
        }
    }
948870
public static function set(array &$array, string $key, $value)
    {
        foreach (\explode('.', $key) as $k) {
            if (!isset($array[$k]) || !\is_array($array[$k])) {
                $array[$k] = [];
            }
            $array = &$array[$k];
        }

        $array = $value;
    }
1050406
public function setSetting($key, $value = null)
    {
        $this->getSettingsComponent()->set($this->getSettingsCategory(), $key, $value);
    }
696020
public function setJson($key, $value = null): void
    {
        if (is_array($key)) {
            foreach ($key as $k => $v) {
                $this->setJson($k, $v);
            }
            return;
        }

        $this->_jsonData[$key] = $value;
    }
52878
static public function set($key, $value) {
        $config = &self::$_config;
        
        Utils::arraySet($config, $key, $value);
    }
344258
public function set(string $key, $value)
    {
        $array = &$this->input;
        $keys = explode('.', $key);

        while (count($keys) > 1) {
            $k = array_shift($keys);
            if (!isset($array[$k]) || ! is_array($array[$k])) {
                $array[$k] = [];
            }
            $array = &$array[$k];
        }

        $array[array_shift($keys)] = $value;
        $this->cache[$key] = &$value;
    }
48314
public function set($key, $value = null)
    {
        $keys = is_array($key) ? $key : [$key => $value];

        foreach ($keys as $key => $value) {
            Arr::set($this->items, $key, $value);
        }
    }
153003
public static function setUrlParameter(string $key, $value=null) :void {
		
		// set the value
		self::$_get[$key] = $value;
		
	}
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);
	}
702146
public function set($key, $value) {
		$this->validateValue($value);
		$this->variables[$key] = $value;
	}
1032832
public function set($key, $value) {
        header('' . $key . ': ' . $value . '', true);
        $this->vars[$key] = $value;
    }
555999
public static function set($key, $value)
    {
        if (is_array($key)) {
            $now = self::self()->getContainer()['settings'];
            foreach ($key as $item) {
                $now = $now[$item];
            }
            $now = $value;
        } else {
            $settings = self::self()->getContainer()['settings'];
            $settings[$key] = $value;
        }
    }
560188
public function set($name, $value)
	{
		if ( $value === null ) {
			unset($this->settings[$name]);
		}
		else {
			$this->settings[$name] = $value;
		}

		$this->store();
	}
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;
    }
121605
public function set_config($key, $value = null)
	{
		if (is_array($key))
		{
			$this->config = \Arr::merge($this->config, $key);
		}
		else
		{
			\Arr::set($this->config, $key, $value);
		}

		return $this;
	}
1130004
public function set($key, $value = null)
    {
        $this->fire('setting', $key, [$key, $value]);

        $generatedKey = $this->getKey($key);

        $serializedValue = $this->serializeValue($value);

        $this->repository->set(
            $generatedKey,
            $this->isEncryptionEnabled()? $this->encrypter->encrypt($serializedValue) : $serializedValue
        );

        if ($this->isCacheEnabled()) {
            $this->cache->forget($generatedKey);
        }

        $this->fire('set', $key, [$key, $value]);

        $this->context(null);
    }
706723
public static function withSetting($key, $value = null)
    {
        return static::all()->filter(function ($row) use ($key, $value) {
            $setting = $row->settings($key);

            if (!is_null($value)) {
                return !is_null($setting) && $setting === $value;
            }

            return !is_null($setting);
        });
    }