Checks that an array of options have been set at runtime.
@param array $options The required options.
172203
public function requiredOptions($options = [])
    {
        if (!count($options)) {
            return true;
        }
        foreach ($options as $option) {
            if (!$this->options()->get($option)) {
                return false;
            }
        }
        return true;
    }
366521
protected function checkOptionsArray(array $options, array $keys)
    {
        foreach ($keys as $intOption) {
            if (isset($options[$intOption]) && !is_array($options[$intOption])) {
                throw new InvalidOptionException($this, $options);
            }
        }
    }
212924
public function setOptions(array $options) : void
    {
        self::$options = array_unique(array_merge(self::$options, $options));
    }
266230
protected function setOptions(array $options)
    {
        $this->options = [];

        foreach ($options as $option => $value) {

            if (!in_array($option, (array)$this->availableOptions)) {
                throw new \InvalidArgumentException(
                    sprintf('filter %s has no option "%s"', get_class($this), $option)
                );
            }

            $this->options[$option] = $value;
        }
    }
205457
public function setOptions(array $options)
    {
        $this->options = [];

        foreach ($options as $k => $v) {
            $this->addOption($k, (array)$v);
        }

        return $this;
    }
684605
private function validateOptions(array $options): void
    {
        foreach ($this->requiredOptions as $name) {
            if (!array_key_exists($name, $options)) {
                throw new InvalidArgumentException(sprintf('Required parameter "%s" is missing.', $name));
            }

            $this->{$name} = $options[$name];
        }
    }
1355519
public function setOptions($options)
    {
        // Valid Options
        $validOptions = ['delete', 'update', 'constraint'];
        foreach ($options as $option => $value) {
            if (!in_array($option, $validOptions, true)) {
                throw new \RuntimeException(sprintf('"%s" is not a valid foreign key option.', $option));
            }

            // handle $options['delete'] as $options['update']
            if ('delete' === $option) {
                $this->setOnDelete($value);
            } elseif ('update' === $option) {
                $this->setOnUpdate($value);
            } else {
                $method = 'set' . ucfirst($option);
                $this->$method($value);
            }
        }

        return $this;
    }
457723
public function setOptions($options) {
    $result = true;
    foreach($options as $option => $value) {
      $result |= $this->setOption($option, $value);
    }
    return $result;
  }
440498
public function setup(array $options)
    {
        foreach ($options as $method => $value) {
            $method = 'set' . ucfirst($method);
            if (method_exists($this, $method)) {
                $this->{$method}($value);
            }
        }
    }
602582
protected function checkRequiredOptions(array $options)
    {
        array_walk(
            $this->supportedOptions,
            function ($supportedOptionData, $supportedOptionName, $options) {
                if (isset($supportedOptionData[1])
                    && true === $supportedOptionData[1]
                    && empty($supportedOptionData[0])
                    && !array_key_exists($supportedOptionName, $options)
                ) {
                    throw new InvalidServiceOptionsException(
                        'Required validation option not set: ' . $supportedOptionName,
                        1456397839
                    );
                }
            },
            $options
        );
    }
1097717
public function _init($options)
    {
		if(is_array($options)) {
			foreach($options as $opt_name => $opt_val) {
				if(property_exists($this, $opt_name)) {
					$this->$opt_name = $opt_val;
				}
			}
		}
    }
413806
public function setPossibleOptions( $options )
	{
		if( !is_array( $options ) )														//  no Array given
			throw InvalidArgumentException( 'No array given.' );						//  throw Exception
		if( $options === $this->possibleOptions )										//  threse Options are already set
			return FALSE;																//  do nothing
		$this->possibleOptions	= $options;												//  set new Options
		return TRUE;																	//  indicate Success
	}
18677
protected function validateOptions(array $options)
    {
        foreach ($options as $option => $value) {
            if (!array_key_exists($option, $this->defaultOptions)) {
                throw new \InvalidArgumentException(sprintf('Unrecognized option "%s".', $option));
            }
        }
        if (isset($options['html']) && !is_bool($options['html'])) {
            throw new \InvalidArgumentException('The option "html" must be a boolean.');
        }
        if (isset($options['html_attributes']) && !is_array($options['html_attributes'])) {
            throw new \InvalidArgumentException('The option "html_attributes" must be an array.');
        }
    }
106026
public function setOptions($options) 
	{
		foreach ($this->options as $key => $option) {
			if (isset($options[$key])) {
				$this->options[$key] = $options[$key];
			}
		}
	}
149356
public function setOptions( array $options )
    {
        foreach ( $this->defaults as $option => $defaults ) {
            $this->values[$option] = ( array_key_exists($defaults['name'], $options) ) ? $options[$option] : $defaults['default'];
        }
    }
143898
public function setOptions(array $options)
    {
        parent::setOptions($options);

        if ($this->hasOption('min') && $this->hasOption('max') ) {
            $this->setMessage(__('Invalid file size (minimum %1$s bytes, maximum %2$s bytes)', $this->getOption('min'), $this->getOption('max')));
        } elseif ($this->hasOption('max')) {
            $this->setMessage(__('The uploaded file is too large (maximum %s bytes)', $this->getOption('max')));
            $this->setOption('min', 0);
        } else {
            throw new common_Exception("Please set 'min' and/or 'max' options!");
        }
    }
124785
public function setOptions(array $options)
    {
        if (isset($options['path']) && is_dir($options['path'])) {
            $this->_path = $options['path'];
        }
        if (isset($options['callback']) && is_callable($options['callback'])) {
            $this->_callback = $options['callback'];
        }
    }