Add multiple options at once
@param array $options an associative array [string $id => array $optionParams]
778827
public function addOptions(array $options): void
	{
		foreach ($options as $key => $option) {
			$this->addOption($key, $option);
		}
	}
1356180
public function addOptions(array $options) : Select
    {
        foreach ($options as $value => $content) {
            $this->addOption($content, $value);
        }

        return $this;
    }
538863
public function initialize(array $options)
    {
        foreach ($options as $optionName => $optionValue) {
            $methodName = 'set' . ucfirst($optionName);
            if (method_exists($this, $methodName)) {
                $this->$methodName($optionValue);
            }
        }
    }
1115820
private function mergeOptions(array $options)
    {
        /** @var Option[] $mergedList */
        $mergedList = array_merge($this->optionList, $options);
        $duplicates = array();
        foreach ($mergedList as $option) {
            foreach ($mergedList as $otherOption) {
                if (($option === $otherOption) || in_array($otherOption, $duplicates)) {
                    continue;
                }
                if ($this->optionsConflict($option, $otherOption)) {
                    throw new \InvalidArgumentException('Failed to add options due to conflict');
                }
                if (($option->short() === $otherOption->short()) && ($option->long() === $otherOption->long())) {
                    $duplicates[] = $option;
                }
            }
        }
        foreach ($mergedList as $index => $option) {
            if (in_array($option, $duplicates)) {
                unset($mergedList[$index]);
            }
        }
        $this->optionList = array_values($mergedList);
    }
121699
public function setOptions(array $options = array())
    {
        foreach (static::$supportedOptions as $key) {
            if (isset($options[$key])) {
                $this->$key = $options[$key];
            }
        }
    }
442212
public function addOptions(array $options)
    {
        foreach ($options as $option) {
            $this->options[] = $option;
        }
        // this will auto select the options based on this fields value
        $this->selectOptionsFromValue();

        return $this;
    }
465679
public function setOptions(array $options)
	{
		foreach ($options as $value => $text) {
			$this->addOption($value, $text);
		}

		return $this;
	}
136756
protected function setAttributes($options = array()) {
		if (is_array($options)) {
			foreach ($options as $attribute => $value) {
				$this->setAttribute($attribute, $value);
			}
		}
	}
908431
public function setOptions(array $options)
    {
        foreach ($options as $index=>$val) {
            if (property_exists($this, $index)) {
                $this->{$index} = $val;
            }
        }
        return $this;
    }
585793
public function setOptions(array $options)
    {
        if ($this->options && is_array($options)) {
            $options = ArrayUtils::merge($this->options, $options);
        }

        $this->options = $options;

        return $this;
    }
1161340
public function addOptions(array $options)
    {
        // `array_merge()` will produce invalid result for cURL options,
        // while `ArrayHelper::merge()` is unable to override cURL options
        foreach ($options as $key => $value) {
            if (is_array($value) && isset($this->_options[$key])) {
                $value = ArrayHelper::merge($this->_options[$key], $value);
            }
            $this->_options[$key] = $value;
        }
        return $this;
    }
1362786
public function optionsByArray($options) {
		if ($options) {
			$this->options = array_merge($this->options, $options);
		}

		return $this;
	}
1228338
protected function initializeOptions(array $options)
    {
        foreach ($options as $key => $value) {
            $method = 'set' . ucfirst($key);
            if (method_exists($this, $method)) {
                call_user_func(array($this, $method), $value);
            }
        }
    }
893147
public function add($id, $actionClass, array $options = array())
    {
        $this->actions[$id] = array(
            'class' => $actionClass,
            'options' => $options,
        );

        return $this;
    }
646762
public function setOptions(array $options)
    {
        if (isset($options['uniqueId'])) {
            $this->sessionId = $options['uniqueId'];
        }

        $this->options = $options;
    }
1186496
public function setOptions(array $options)
    {
        $availableOptions = [
            'default',
            'group',
            'key',
            'message',
            'messages',
            'rules'
        ];

        foreach ($availableOptions as $option) {
            if (isset($options[$option])) {
                $this->$option = $options[$option];
            }
        }
    }
294520
public function addOptions(array $options)
    {
        foreach ($options as $name => $value) {
            $this->addOption($name, $value);
        }

        return $this;
    }