设置参数

@param array $options

@return $this
511874
public function setOptions(array $options)
    {
        if (isset($options['indent'])) {
            $this->indent = $options['indent'];
        }
        if (isset($options['quote'])) {
            $this->quote = $options['quote'];
        }
        if (isset($options['foregroundColors'])) {
            $this->foregroundColors = $options['foregroundColors'];
        }
        if (isset($options['backgroundColors'])) {
            $this->backgroundColors = $options['backgroundColors'];
        }
        return $this;
    }
1032703
public function setOptionFromArray($options) {
        foreach($options as $option => $value) {
            $this->setOption($option, $value);
        }

        return $this;
    }
908431
public function setOptions(array $options)
    {
        foreach ($options as $index=>$val) {
            if (property_exists($this, $index)) {
                $this->{$index} = $val;
            }
        }
        return $this;
    }
681563
public function setOptions(array $options)
    {
        if (isset($options['on_update'])) {
            $this->autoUpdate($options['on_update']);
        } elseif (isset($options['auto_update'])) {
            $this->autoUpdate();
        }

        return parent::setOptions($options);
    }
27631
public function setOptions(array $options)
    {
        @trigger_error(sprintf('The %s() method is deprecated since version 3.3 and will be removed in 4.0.', __METHOD__), E_USER_DEPRECATED);

        $this->options = $options;

        return $this;
    }
1071404
public function options(array $options = null)
    {
        if (null === $options) {
            return $this->options;
        }

        $this->options = [];
        foreach($options as $option)
            $this->options[$option] = false;

        return $this;
    }
508664
public function setOptions(array $options) {
    foreach ($options as $key => $value) {
      if (is_int($key)) {
        $option  = '--' . $value;
      }
      elseif (strlen($key) == 1) {
        $option = '-' . $key;
        if (!empty($value)) {
          $option .= ' ' . escapeshellarg($value);
        }
      }
      else {
        // Do not render --uri=default.
        if ($key == 'uri' && $value == 'default') {
          continue;
        }
        $option = '--' . $key;
        if (!empty($value)) {
          $option .= '=' . escapeshellarg($value);
        }
      }
      if (!in_array($option, $this->options)) {
        $this->options[] = $option;
      }
    }
    return $this;
  }
294520
public function addOptions(array $options)
    {
        foreach ($options as $name => $value) {
            $this->addOption($name, $value);
        }

        return $this;
    }
561851
public function options(array $options = [])
    {
        $this->options = $options;

        foreach ($this->meta as $name) {
            $this->filterMetaType($name);
        }

        return $this;
    }
286036
public function addOptions(array $options)
    {
        foreach ($options as $name => $option) {
            $this->options[$name] = $option;
        }
        $this->compiled = null;

        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;
    }
526324
public function setFormatOptions(array $options)
    {
        foreach ($options as $name => $handler) {
            $this->setFormatOption($name, $handler);
        }
        return $this;
    }
115300
public function setOptions($options)
    {
        if (!is_array($options) && !$options instanceof \Traversable) {
            throw new \InvalidArgumentException(sprintf(
                    'Parameter provided to %s must be an array or Traversable',
                    __METHOD__
            ));
        }
    
        foreach ($options as $key => $value){
            $this->setOption($key, $value);
        }
         
        return $this;
    }
1228143
public function setOptions( $options ) {
		$this->options = [];

		$this->datalist->clearContent();
		foreach ( $options as $opt ) {
			$option = ( new Tag( 'option' ) )
				->setAttributes( [ 'value' => $opt['data'] ] )
				->appendContent( $opt['label'] ?? $opt['data'] );

			$this->options[] = $option;
			$this->datalist->appendContent( $option );
		}

		return $this;
	}
1303107
public function setOptions(array $options)
    {
        foreach ($options as $name => $value) {
            $method = 'set' . ucfirst($name);

            if (method_exists($this, $method)) {
                $this->$method($value);
            } else {
                $this->options[$name] = $value;
            }
        }

        return $this;
    }
1077659
public function setOptions(array $options) {
		if(isset($options['data_type']))
			$this->data_type = $options['data_type'];
		if(isset($options['default']))
			$this->value = $options['default'];
		if(isset($options['widget']))
			$this->widget = $options['widget'];

		$this->options = array_merge_recursive($this->options, $options);

		return $this;
	}
375352
public function addOptions(array $options): Menu
    {
        foreach ($options as $value => $label) {
            $this->addOption($value, $label);
        }

        return $this;
    }