Set extra options if any were requested

@param  array $extraOptions Array of extra options (key => value)
@param  mixed $instance Instance you want to set options for
336210
public function loadExtraOptions($extraOptions, $instance)
    {
        foreach ($extraOptions as $name => $value) {
            if ($this->reflected->hasMethod($name)) {
                // There is a method to handle this option
                call_user_func_array(
                    array($instance, $name),
                    is_array($value) ? $value : array($value)
                );
                continue;
            }
            if ($this->reflected->hasProperty($name) &&
                $this->reflected->getProperty($name)->isPublic()
            ) {
                // There is a public member we can set for this option
                $instance->$name = $value;
                continue;
            }

            if ($this->canHandle($name)) {
                // There is a custom handler for that option
                $closure = $this->getExtraOptionsHandler($name);
                $closure($instance, $value);
            }
        }
    }
912681
public function setOptions(array $options, $merge = true)
    {
        if ($merge) {
            $this->options = array_replace($this->options, $options);
        } else {
            $this->options = $options;
        }
    }
1033230
public void setExtra(Map<String, Object> extra) {
        if (extra == null) {
            this.extra = new HashMap<>();
        } else {
            this.extra = extra;
        }
    }
1350131
protected function verifyExtras(array $extras)
    {
        if (!isset($extras['php-env-builder'])) {
            throw new \InvalidArgumentException(
                'The parameter handler needs to be configured through the ' .
                'extra.php-env-builder setting.'
            );
        }

        if (!is_array($extras['php-env-builder'])) {
            throw new \InvalidArgumentException(
                'The extra.php-env-builder setting must be an array or a configuration object.'
            );
        }

        if (!isset($extras['php-env-builder']['questions']) || !is_array($extras['php-env-builder']['questions'])) {
            throw new \InvalidArgumentException(
                'The extra.php-env-builder.questions setting must be an array of questions.'
            );
        }
    }
1142934
function (options) {
			
			inputEx.SelectTwiceField.superclass.setOptions.call(this, options);
			
			this.options.choices = lang.isArray(options.choices) ? options.choices : [];
			
			this.options.valueSeparator = options.valueSeparator || "_";
			
		}
709695
public function setExtra($extra)
    {
        if (isset($extra['secret']) && strlen($extra['secret']) > 17) {
            $extra['secret'] = hex2bin($extra['secret']);
        }
        if (isset($extra['secret']) && strlen($extra['secret']) == 17) {
            $extra['secret'] = substr($extra['secret'], 0, 16);
        }
        $this->extra = $extra;
    }
564332
function(options) {
  	   inputEx.TinyMCEField.superclass.setOptions.call(this, options);
  	   
  	   this.options.opts = options.opts || this.defaultOpts;
   }
436286
function addExtra(properties, extra) {
    for(var key in extra){
      if(extra.hasOwnProperty(key)) {
        properties[key] = extra[key];
      }
    }

    return properties;
  }
557136
public static function buildOptions(array $baseOptions, array $extraOptions, Tidal $tidal)
    {
        $options                = array_merge($baseOptions, $extraOptions);
        $options['countryCode'] = $tidal->getUserInfo()['countryCode'];

        return '?'.http_build_query($options);
    }
839745
public function setOptions(iterable $options): void
    {
        foreach ($options as $optionKey => $optionValue) {
            $this->setOption($optionKey, $optionValue);
        }
    }
710716
public function setOptions(array $options)
    {
        foreach ($options as $name => $value) {
            $this->setOption($name, $value);
        }
    }
965582
public function hardwareOption($option, $additionalOption = null)
    {
        $command = new Command\Stored\HardwareOptionCommand($option, $additionalOption);
        $this->getComposite()->addCommand($command);
        return $this;
    }
201843
public function setOptions(AbstractOptions $options)
    {
        $optionsClass = Conversion::getOptionsFullQualifiedClassName($this);
        $inputOptionsClass = get_class($options);
        if ($inputOptionsClass !== $optionsClass) {
            throw new Exception\DomainException(sprintf(
                '"%s" expects that options set are an array or a valid "%s" instance; received "%s"',
                __METHOD__,
                $optionsClass,
                $inputOptionsClass
            ));
        }
        $this->options = $options;
        return $this;
    }
212924
public function setOptions(array $options) : void
    {
        self::$options = array_unique(array_merge(self::$options, $options));
    }
1291285
public function getExtraOptionsHandler($extraOptionName)
    {
        // Check extraOption handlers that are valid for all classes
        if (isset(self::$extraOptionHandlers['*'][$extraOptionName])) {
            return self::$extraOptionHandlers['*'][$extraOptionName];
        }

        // Check extraOption handlers that are valid for the given class
        if (isset(self::$extraOptionHandlers[$this->class][$extraOptionName])) {
            return self::$extraOptionHandlers[$this->class][$extraOptionName];
        }

        return null;
    }
1338141
public static function set_properties(&$instance, $params) {
        $params = (array) $params;
        foreach ($params as $var => $value) {
            if (in_array($var, $instance->required_fields) or array_key_exists($var, $instance->optional_fields)) {
                $instance->$var = $value;
            }
        }
    }
1055651
public function setOptions($options)
    {
        if (!is_array($options)) {
            throw new Exception\InvalidArgumentException(sprintf(
                '[%s] expects array; received [%s]',
                __METHOD__,
                gettype($options)
            ));
        }

        $this->options = $options;
    }