Set options.  Does not overwrite previously set options.
359696
function setOptions(options) {
  var self = this
  var current = self.options
  var ruleRepetition
  var key

  if (options == null) {
    options = {}
  } else if (typeof options === 'object') {
    options = xtend(options)
  } else {
    throw new Error('Invalid value `' + options + '` for setting `options`')
  }

  for (key in defaults) {
    validate[typeof defaults[key]](options, key, current[key], maps[key])
  }

  ruleRepetition = options.ruleRepetition

  if (ruleRepetition && ruleRepetition < 3) {
    raise(ruleRepetition, 'options.ruleRepetition')
  }

  self.encode = encodeFactory(String(options.entities))
  self.escape = escapeFactory(options)

  self.options = options

  return self
}
212924
public function setOptions(array $options) : void
    {
        self::$options = array_unique(array_merge(self::$options, $options));
    }
1133717
protected function setOptions($options)
    {
        if (!$options instanceof OptionsInterface) {
            $options = is_array($options) ? $options : [];
            $options = new Options($options);
        }

        $this->options = $options;
    }
534824
def _fix_set_options(cls, options):
        """"""
        optional_set_options = ('ignore', 'select')
        mandatory_set_options = ('add_ignore', 'add_select')

        def _get_set(value_str):
            """Split `value_str` by the delimiter `,` and return a set.

            Removes any occurrences of '' in the set.
            Also expand error code prefixes, to avoid doing this for every
            file.

            """
            return cls._expand_error_codes(set(value_str.split(',')) - {''})

        for opt in optional_set_options:
            value = getattr(options, opt)
            if value is not None:
                setattr(options, opt, _get_set(value))

        for opt in mandatory_set_options:
            value = getattr(options, opt)
            if value is None:
                value = ''

            if not isinstance(value, Set):
                value = _get_set(value)

            setattr(options, opt, value)

        return options
149074
function setOptions( options ){
        if( this.addListener ){
            for( var opt in options ){
                if( typeof( options[ opt ] ) !== 'function' || !(/^on[A-z]/).test(opt)){
                    continue;
                }
                this.addListener( removeOn( opt ), options[ opt ]);
                delete options[opt];
            }
        }
        this.options = merge.apply(null, append([{}, this.options], arguments ) );
        return this;
    }
1247458
def set_options(self, multiplex_first=True, **bogus_options):
        ""
        self.multiplex_first = multiplex_first
        self._warn_bogus_options(**bogus_options)
874775
public function setOption()
    {
        $args = func_get_args();

        $options = [];

        if (is_array($args[0])) {
            foreach ($args[0] as $key => $value)
                $options[$key] = $value;
        } else {
            $options[$args[0]] = $args[1];
        }

        $this->options += $options;

        return $this;
    }
102055
function setOptions( options ) {
		if ( !options.hasOwnProperty( 'objectMode' ) ) {
			options.objectMode = false;
		}
		if ( !options.hasOwnProperty( 'encoding' ) ) {
			options.encoding = null;
		}
	}
871311
public void setOptions(JspToolsOptionsMap options) {
        if (logger!=null) {
            if(com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled()&&logger.isLoggable(Level.FINEST)){
                logger.logp(Level.FINEST, CLASS_NAME,"setOptions", "setOptions is called");
            }
        }
        this.optionOverrides = options;
    }
732121
function setOptions(bench, options) {
    options = extend({}, bench.constructor.options, options);
    bench.options = forOwn(options, function(value, key) {
      if (value != null) {
        // add event listeners
        if (/^on[A-Z]/.test(key)) {
          forEach(key.split(' '), function(key) {
            bench.on(key.slice(2).toLowerCase(), value);
          });
        } else if (!hasKey(bench, key)) {
          bench[key] = deepClone(value);
        }
      }
    });
  }
1267199
protected function setOption() {
		
		// find the value that was passed
		$updateOption = Console::findCommandOptionValue("set");
		$updateOptionBits = explode("=",$updateOption);
		if (count($updateOptionBits) == 1) {
			Console::writeError("the --set value should look like <info>optionName=\"optionValue\"</info>. nothing was updated...");
		}
		
		// set the name and value that were passed
		$updateName   = $updateOptionBits[0];
		$updateValue  = (($updateOptionBits[1][0] == "\"") || ($updateOptionBits[1][0] == "'")) ? substr($updateOptionBits[1],1,strlen($updateOptionBits[1])-1) : $updateOptionBits[1];
		
		// make sure the option being updated already exists
		$currentValue = Config::getOption($updateName);
		
		if (!$currentValue) {
			Console::writeError("the --set option you provided, <info>".$updateName."</info>, does not exists in the config. nothing will be updated...");
		} else {
			Config::updateConfigOption($updateName,$updateValue);
			Console::writeInfo("config option updated...");
		}
		
	}
651708
def set_option(self, name, value):
        
        self.__validate_option_name(name)
        self.__options[name] = value
841284
def set_option(self, section, option, value):
        
        if self.config.has_section(section):
            self.config.set(section, option, value)
            return (True, self.config.options(section))
        return (False, 'Section: ' + section + ' does not exist')
295581
public void setOptions(Set<Option> options) {
        this.options = (options == null)
                       ? Collections.<Option>emptySet()
                       : new HashSet<Option>(options);
    }
958313
private void setOptions(RuntimeConfiguration rc) {
        if (hasOption(SHORT_OPT_TIME)) {
            rc.setTime(true);
        }
        if (hasOption(LONG_OPT_DEBUG)) {
            rc.setDebug(true);
        }
        if (hasOption(LONG_OPT_VERBOSE)) {
            rc.setVerbose(true);
        }
        if (hasOption(LONG_OPT_PEDANTIC)) {
            rc.setWarningsAsErrors(true);
        }
    }
379807
def _set_option(self, value):
        
        if len(self._options) > 0:
            if value in self._options:
                self._selected.set(value)
                return True
            else:
                return False
        else:
            return False
314926
protected function _setOptions()
    {
        if (!is_null($this->getHeader())) {
            $this->_setOpt(CURLOPT_HTTPHEADER, $this->getHeader());
        }
        $this->_setOpt(CURLOPT_URL, $this->getUrl());

        if ($this->getMethod() == "POST") {
            $this->_setOpt(CURLOPT_POST, 1);
            $this->_setOpt(CURLOPT_POSTFIELDS, $this->_formParamsForPost($this->getParameters()));
        }

        $aOptions = $this->getOptions();
        if (count($aOptions)) {
            foreach ($aOptions as $sName => $mValue) {
                $this->_setOpt(constant($sName), $mValue);
            }
        }
    }