Save config

@param string $setting
@param mixed $value
11285
public function set($setting, $value = null) {
        $this->store->set($setting, $value);
        $this->dirty = true;
    }
419228
public function addSetting($name, $value) {
        $setting = new Setting();
        $setting->setName($name)
                ->setValue($value);
        $this->builder->addDirective($setting);
        return $this;
    }
1256594
public function setSetting( string $name, $value ): self
	{
		if (in_array($name, self::SETTINGS_INIT_ONLY))
			throw new SettingsException("Settings option '$name' can only be set on initialization of the library.");

		$this->settings[$name] = $value;
		return $this;
	}
1151266
public function setSetting($path, $value)
    {
        if ($value === 'false') {
            $value = false;
        } else if ($value === 'true') {
            $value = true;
        } else if ($value === 'null') {
            $value = null;
        }
        
        $parts = explode('.', $path);
        $settings = $this->updateSetting($this->settings, $parts, $value);
        
        if (is_array($settings)) {
            $this->settings = $settings;
        }
    }
548230
public function set($key, $value)
    {
        $config = $this->data;
        if (!$key) {
            $config = array_merge($config, $value);
        }
        $key = is_array($key) ? $key : [$key];

        $data = &$config;
        while ($key) {
            $k = array_shift($key);
            $config[$k] = isset($config[$k]) ? $config[$k] : [];
            $config[$k] = $key
                ? $config[$k]
                : (is_array($value)
                    ? array_merge($config[$k], $value)
                    : $value);
            $config = &$config[$k];
        }
        $this->data = $data;
        return $this->save();
    }
339004
public function put($key, $value)
    {
        // if key exits then override
        if ($this::has($key)) {
            $setting = (new SettingModel)
                ->cached()
                ->where('key', $key)
                ->first();

            $setting->value = $value;

            return $setting->save();
        }

        return SettingModel::create([
            'key' => $key,
            'value' => $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);
	}
1236883
public function set_config($name, $value) {
        $pluginname = $this->get_name();
        $this->load_config();
        if ($value === NULL) {
            unset($this->config->$name);
        } else {
            $this->config->$name = $value;
        }
        set_config($name, $value, "enrol_$pluginname");
    }
661376
public function valueDate($value = '', $value_format = '', $setting_format = '')
    {
        if (is_object($value)) {
            $value = $value->format($value_format);
        } else {
            $value = '';
        }
        if ($setting_format !== false) {
            $this->data('datepicker-format', $setting_format);
        }

        return parent::attr('value', $value);
    }
1321811
public function addSetting($setting)
    {
        $data = array(
            'setting_key' => $setting
        );
        
        if (in_array($setting, $this->getSerialized())) {
            $data['serialized'] = '1';
        }
        
        return $this->db->insert($this->getTable(), $data);
    }
213469
public function offsetSet($offset, $value)
    {
        if (isset($this->config[$offset])) {
            $this->config[$offset] = $value;
        }
    }
1355718
public function set($key, $value)
    {
        $setting = SettingModel::create(
            [
                'key' => $key,
                'value' => $value,
            ]
        );

        return $setting ? $value : false;
    }
1183136
public function set(string $key, string $value): bool
    {
        if (!$this->users_id) {
            throw new Exception('No users is set to save config');
        }

        $config = new self();
        $config->users_id = $this->users_id;
        $config->name = $key;
        $config->value = $value;
        if (!$config->save()) {
            throw new Exception(current($config->getMessages()));
        }

        return true;
    }
130377
public static function set($key,$value,$settings=array())
		{
			self::_cleanPrevious();

			$settings['readOnce'] = isset($settings['readOnce']) ? (boolean) $settings['readOnce'] : self::$_readOnce;

			$_SESSION[self::$_sessionKey.$key] = array(1,$value,$settings);
		}
467911
public function edit_setting( $setting, $key, $value ) {
		if ( ! $this->is_setting( $setting ) ) {
			return true;
		}
		$priority                                         = $this->_setting_priority[ $setting ];
		$this->_settings[ $priority ][ $setting ][ $key ] = $value;

		return true;
	}
244006
final public function setSetting($key, $value)
    {
        if (empty($key)) {
            return false;
        }
        $this->settings = \WebServCo\Framework\ArrayStorage::set($this->settings, $key, $value);
        return true;
    }
249651
public function set($key, $value = null)
     {
         if (isset($this->_settings->$key)) {
             $this->_settings->$key = $value;
         }

         return $this->_settings->$key;
     }