Define new configuration settings.

@since 1.1.2

@param string $option → option name
@param mixed  $value  → value/s

@return mixed
974224
public static function setOption($option, $value)
    {
        $that = self::getInstance();

        if (! is_array($value)) {
            return $that->settings[$option] = $value;
        }

        if (array_key_exists($option, $that->settings)) {
            $that->settings[$option] = array_merge_recursive(
                is_array($that->settings[$option]) ? $that->settings[$option] : [],
                $value
            );
        } else {
            foreach ($value as $key => $value) {
                $that->settings[$option][$key] = $value;
            }
        }

        return $that->settings[$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);
    }
1125888
public function setOptions($key, $value)
    {
        if (isset($this->options[ $key ]))
            $this->options[ $key ] = $value;

        return $this;
    }
820000
public function setConfig($reference, $value)
    {
        if (!array_key_exists($reference, $this->config)) {
            user_error("Unknown option reference: $reference", E_USER_ERROR);
        }

        if ($reference == 'actions') {
            user_error('Bulk actions must be edited via addBulkAction() and removeBulkAction()', E_USER_ERROR);
        }

        if (($reference == 'editableFields') && !is_array($value)) {
            $value = array($value);
        }

        $this->config[$reference] = $value;

        return $this;
    }
288266
public static function options( $name = '', $value = '' ) {

		if ( ! empty( $value ) ) {
			$GLOBALS['_OPTIONS'][ $name ] = $value;
		}

		if ( empty( $name ) ) {
			return ( isset( $GLOBALS['_OPTIONS'] ) ) ? $GLOBALS['_OPTIONS'] : NULL;
		} else {
			return ( isset( $GLOBALS['_OPTIONS'][ $name ] ) ) ? $GLOBALS['_OPTIONS'][ $value ] : NULL;
		}

	}
755047
public function addOption($option, $value = null)
    {
        if (is_array($option)) {
            $this->options = $option + $this->options;
        } else {
            $this->options[$option] = $value;
        }
    }
289183
public function setOption($option, $value)
    {
        if (! is_array($value)) {
            return $this->complement[$option] = $value;
        }

        if (array_key_exists($option, $value)) {
            $this->complement[$option] = array_merge_recursive(
                $this->complement[$option],
                $value
            );
        } else {
            foreach ($value as $key => $value) {
                $this->complement[$option][$key] = $value;
            }
        }

        return $this->complement[$option];
    }
738121
public function setValue(?string $value) : Setting
    {

        if ($this->data['value'] !== $value) {
            $this->data['value'] = $value;
            $this->setModified('value');
        }

        return $this;
    }
638413
public function setOption($option, $value)
    {
        if ($this->isValidOption($option)) {
            $this->options[$option] = $value;
        }

        return $this;
    }
653244
public function config($value = null, $default = false)
        {
            // Setter
            if (Arrays::is($value)) {
                if (count($value) > 0) {
                    // Merge given config settings over any previous ones (if $value is array)
                    static::$cfg = $this->arrayMergeRecursiveReplace(static::$cfg, $value);
                }
            // Getter
            } else {
                // Config array is static to persist across multiple instances
                $cfg = static::$cfg;

                // No value passed - return entire config array
                if ($value === null) {
                    return $cfg;
                }

                // Find value to return
                if (strpos($value, '.') !== false) {
                    $cfgValue = $cfg;
                    $valueParts = explode('.', $value);

                    foreach($valueParts as $valuePart) {
                        if (isset($cfgValue[$valuePart])) {
                            $cfgValue = $cfgValue[$valuePart];
                        } else {
                            $cfgValue = $default;
                        }
                    }
                } else {
                    $cfgValue = $cfg;

                    if (isset($cfgValue[$value])) {
                        $cfgValue = $cfgValue[$value];
                    } else {
                        $cfgValue = $default;
                    }
                }

                return $cfgValue;
            }
        }
899005
protected function setConfig($value, $key)
    {
        $setter = 'set' . ucfirst($key);

        if (method_exists($this, $setter)) {
            $this->$setter($value);
        } elseif (property_exists($this, $key)) {
            $this->$key = $value;
        }

        return $this;
    }
674361
public function option($option, $value = null)
    {
        if (func_num_args() == 1) {
            return array_get($this->options, $option);
        }

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

        return $this;
    }
670522
public function setOption(string $option, $value) {
        $this->validateOption($option, $value);
        $this->options[$option] = $value;
    }
1343673
public function set($setting, $value)
    {
        switch ($setting) {
            case self::SETTING_DEFAULT_MODE:
                OptionParser::$defaultMode = $value;
                break;
            default:
                $this->settings[$setting] = $value;
                break;
        }
        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;
    }
239830
public function setConfig($key, $value)
    {
        if (! is_object($value) || ! $value instanceof ConfigurableService) {
            $value = new ConfigurationService(array(ConfigurationService::OPTION_CONFIG => $value));
        }
        $value->setHeader($this->getConfigHeader($key));
        $this->registerService($this->getId().'/'.$key, $value);
        return true;
    }