Set a configuration value for this plugin

@param string $name The config key
@param string $value The config value
@return bool
175406
public final function set_config($name, $value) {
        global $DB;

        $dbparams = array('assignment'=>$this->assignment->get_instance()->id,
                          'subtype'=>$this->get_subtype(),
                          'plugin'=>$this->get_type(),
                          'name'=>$name);
        $current = $DB->get_record('assign_plugin_config', $dbparams, '*', IGNORE_MISSING);

        if ($current) {
            $current->value = $value;
            return $DB->update_record('assign_plugin_config', $current);
        } else {
            $setting = new stdClass();
            $setting->assignment = $this->assignment->get_instance()->id;
            $setting->subtype = $this->get_subtype();
            $setting->plugin = $this->get_type();
            $setting->name = $name;
            $setting->value = $value;

            return $DB->insert_record('assign_plugin_config', $setting) > 0;
        }
    }
1007949
public function set($name, $value)
    {
        if (property_exists($this, $name)) {
            $this->$name = $value;

            return true;
        }

        return null;
    }
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;
    }
767412
public function setConfig($key, $value = null)
	{
		\Arr::set($this->config, $key, $value);

		return $this;
	}
875690
public function set(string $name, string $value)
    {
        $this->values[$name] = $value;
        return $this;
    }
301187
public static function set($name, $value)
    {
        if (! strstr($name, '.')) {
            return false;
        }

        $parts = explode('.', $name, 2);
        $section = $parts[0];
        $key = $parts[1];

        self::getInstance()->add($section, array($key => $value));

        return true;
    }
127873
public function set_config($key, $value)
	{
		\Arr::set($this->config, $key, $value);

		return $this;
	}
656565
public function setOption($name, $value) {
		$this->validateName($name);
		$this->config[$name] = $value;
	}
1279569
public function set($name, $value)
    {
        $configuration = $this->configuration->getParameter('configuration');
        $configuration[$name] = $value;
        $this
            ->configuration
            ->setParameter(
                'configuration',
                $configuration
            );

        return $this;
    }
188631
public function setConfig($key,$value = ''){
		if(is_array($key)){
			$this->_config = array_merge($this->_config,$key);
		}
		else{
			$this->_config[$key] = $value;
		}
		$this->updateConfig();
		
		return $this;
	}
305369
public static function set($name, $value)
	{

		if (!isset(self::$configParams[$name])) {
			throw new GatewayException('User undefined config param [' . $name . ']');
		}

		self::$configParams[$name] = $value;

	}
1267946
public static function set($name, $value)
    {
        return (self::has($name) !== true) ? $_SESSION[$name] = $value : false;
    }
619259
public function setValue($name, $value)
    {
        // handle field
        if (static::fieldExists($name)) {
            $this->_setFieldValue($name, $value);
        }
        // undefined
        else {
            return false;
        }
    }
616885
public function setConfig($key = null, $value = null)
    {
        if (is_array($key)) {
            $this->config = $key;
        } else {
            $this->config[$key] = $value;
        }

        return $this;
    }
119508
public function set(string $key, $value): bool
    {
        if (is_string($key) === false || $key === "") {
            return false;
        }

        $this->_configValues[$key] = $value;
        return true;
    }
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;
        }
    }
26037
public function setVar($name, $value)
    {
        $this->loadVars();
		if ($value === null) {
			unset($this->_config[$name]);
		}
		else {
			$this->_config[$name] = $value;
		}
		$f = fopen(PREFS_FILE,'w');
		foreach($this->_config as $name => $value) {
			if (is_array($value)) continue;
			fwrite($f,$name."=".$value."\n");
		}
		foreach($this->_config as $name => $value) {
			if (!is_array($value)) continue;
			fwrite($f,"\n[".$name."]\n");
			foreach ($value as $key => $val) {
				fwrite($f,$key."=".$val."\n");
			}
		}		
		fclose($f);  			
    }