Save option

@param string $optionName
@param mixed $value
541930
public function saveOption($optionName, $value)
    {
        $options = $this->getOption();
        $options[$optionName] = $value;

        if ($this->multiSite) {
            update_site_option($this->settingsName, $options);
        } else {
            update_option($this->settingsName, $options);
        }
    }
819986
public function appendAttribute($name, $value, $option = TRUE)
	{
		if (is_array($value)) {
			$prev = isset($this->attrs[$name]) ? (array)$this->attrs[$name] : [];
			$this->attrs[$name] = $value + $prev;

		} elseif ((string)$value === '') {
			$tmp = &$this->attrs[$name]; // appending empty value? -> ignore, but ensure it exists

		} elseif (!isset($this->attrs[$name]) || is_array($this->attrs[$name])) { // needs array
			$this->attrs[$name][$value] = $option;

		} else {
			$this->attrs[$name] = [$this->attrs[$name] => TRUE, $value => $option];
		}

		return $this;
	}
1007190
public static function setOption($optionName,$optionValue) {

		if (isset(self::$store)) {
			self::$store[$optionName] = $optionValue;
			return true;
		}

		return false;

	}
834300
public function SetFormValue($FieldName, $Value = NULL) {
      $this->FormValues();
      if (is_array($FieldName))
         $this->_FormValues = array_merge($this->_FormValues, $FieldName);
      else
         $this->_FormValues[$FieldName] = $Value;
   }
67078
public function setOption($Name, $Value)
    {
        if (!isset($this->options[$Name])) {
            throw $this->newException('Unknown option: ' . $Name);
        }
        $this->options[$Name] = $Value;
    }
416680
public function setOption($option, $value) {
    // The only option we allow to be changed is OPT_PREFIX_KEY
    if ($option == self::OPT_PREFIX_KEY) {
      $this->options[$option] = $value;
      return true;
    }
    return false;
  }
45186
public function setOption(string $option, $value) : object
    {
        $this->options[$option] = $value;
        return $this;
    }
302861
public function option($option, $value = null)
    {
        if (func_num_args() == 1) {
            return Arr::get($this->options, $option);
        }

        $this->options[$option] = $value;

        return $this;
    }
1358663
public function set($option, $value)
    {
        if (method_exists($this, $option)) {
            return $this->{$option}($value);
        }
        $this->_options[$option] = $value;

        return $this;
    }
881319
public function setOption(int $option, mixed $value)
    {
        curl_setopt($this->curl, $option, $value);
    }
670522
public function setOption(string $option, $value) {
        $this->validateOption($option, $value);
        $this->options[$option] = $value;
    }
65980
public function setOption(string $key, $value): void
    {
        if (array_key_exists($key, $this->options)) {
            $this->options[$key] = $value;

            return;
        }

        throw new Exception('Invalid option key "' . $key . '".', Exception::INVALID_OPTION);
    }
230481
public function setOption($option, $value)
    {
        switch ($option) {
            case FTPClient::TIMEOUT_SEC:
                if ($value <= 0) {
                    throw new Exception('Timeout value must be greater than zero');
                }
                break;

            case FTPClient::AUTOSEEK:
                if (!is_bool($value)) {
                    throw new Exception('Autoseek value must be boolean');
                }
                break;
            
            default:
                throw new Exception('Unsupported option');
                break;
        }

        return @ftp_set_option($this->connection, $option, $value);
    }
1300726
public function setOpt($option, $value)
    {
        $required_options = array(
            CURLOPT_RETURNTRANSFER => 'CURLOPT_RETURNTRANSFER',
        );

        if (in_array($option, array_keys($required_options), true) && !($value === true)) {
            trigger_error($required_options[$option] . ' is a required option', E_USER_WARNING);
        }

        $success = curl_setopt($this->curl, $option, $value);
        if ($success) {
            $this->options[$option] = $value;
        }
        return $success;
    }
1074978
public function setOption($option, $value)
    {
        if (! (@ldap_set_option($this->connection, $option, $value))) {
            $code = @ldap_errno($this->connection);
            throw new OptionException(
                sprintf(
                    'Could not change option %s value: Ldap Error Code=%s - %s',
                    $code,
                    ldap_err2str($code)
                )
            );
        }
    }
1201266
public function addOption($option, $optionValue)
    {
        if (!in_array($option, $this->possibleOptions)) {
            return;
        }

        $this->constraints[$option] = $optionValue;
    }
1256199
public function setOptionValue($optionName, $optionValue, array $values = [])
    {
        if (!isset($this->options[$optionName])) {
            $this->options[$optionName] = [
                'value' => $optionValue,
                'values' => $values,
            ];
        } elseif (!empty($this->options[$optionName]['values']) && !in_array($optionValue, $this->options[$optionName]['values'], true)) {
            throw new \InvalidArgumentException(sprintf('Invalid value "%s" for option "%s", possible values: %s', $optionValue, $optionName, implode(', ', $this->options[$optionName]['values'])), __LINE__);
        } else {
            $this->options[$optionName]['value'] = $optionValue;
        }
        return $this;
    }