Populates or adds parts to current query clauses using an array.
This is handy for passing all query clauses at once.

@param array $options the options to be applied
@return $this This object
433182
public function applyOptions(array $options)
    {
        if (isset($options['page'])) {
            $this->page($options['page']);

            unset($options['page']);
        }
        if (isset($options['limit'])) {
            $this->limit($options['limit']);

            unset($options['limit']);
        }
        if (isset($options['order'])) {
            $this->order($options['order']);

            unset($options['order']);
        }
        if (isset($options['conditions'])) {
            $this->where($options['conditions']);

            unset($options['conditions']);
        }

        $this->_options = Hash::merge($this->_options, $options);

        return $this;
    }
526324
public function setFormatOptions(array $options)
    {
        foreach ($options as $name => $handler) {
            $this->setFormatOption($name, $handler);
        }
        return $this;
    }
169434
public function replace(array $options = [])
    {
        $data = $this->serialize();

        $this->security->getKuzzle()->query(
            $this->security->buildQueryArgs('replaceUser'),
            $data,
            $options
        );

        return $this;
    }
1193037
public function create(array $options = [])
    {
        $data = $this->creationSerialize();

        $this->security->getKuzzle()->query(
            $this->security->buildQueryArgs('createUser'),
            $data,
            $options
        );

        return $this;
    }
675737
public function save(array $options = array())
    {
        if ($this->isNew()) {
            $this->queryFields = array();
            $batchInsertOptions = $options;
            $updateOptions = array();
        } else {
            $batchInsertOptions = array();
            $updateOptions = $options;
        }

        $this->getRepository()->save($this, $batchInsertOptions, $updateOptions);

        return $this;
    }
261773
public function createOptions(Array $options) {

		$this->options = [];

		foreach($options as $k => $v) {
			$this->appendOption(new SelectOptionElement($k, $v, $this));
		}

		$this->setValue();

		return $this;

	}
727513
public function setOptions($options)
    {
        if (!is_int($options) && !is_null($options)) {
            throw new InvalidArgumentException('Invalid options.');
        }

        $this->options = $options ?: 0;

        $this->handleChangedParameters();

        return $this;
    }
194851
public function options(array $options, string $selected=null) : self {
        foreach ($options as $key => $value) {
            if (is_int($key))
                $key = $value;
            if ($selected == $key)
                $this->elem("option @value=? @selected=selected", [$key])->text($value)->end();
            else
                $this->elem("option @value=?", [$key])->text($value)->end();
        }
        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;
    }
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);
    }
1353655
public function addQueryParams(array $params) {
		foreach ($params as $param => $value) {
			$this->setQueryParam($param, $value);
		}
		
		return $this;
	}
615051
public function withOptions(array $options = []): Element
    {
        $this->options = array_merge(
            $this->options,
            $options
        );

        return $this;
    }
164411
protected function _setDefaultUserOptions(array $options) {
    foreach ($options as $option=>$value) {
      if (!$this->getUserOption($option))
        $this->setUserOption($option,$value);
    }
    return $this;
  }
610912
public function setOptsByArray($options)
	{
		foreach (self::$_setableOptions as $optionKey) {
			if (isset($options[$optionKey])) {
				$this->$optionKey = $options[$optionKey];
			}
		}

		return $this;
	}
749334
public function setOptions($options)
	{
		$options = is_array($options) ? $options : array($options);

		foreach ($options as $option)
		{
			$this->addOption($option);
		}

		return $this;
	}
929490
public function setOptions(array $options)
    {
        if (isset($options['bitstring_padding']) && \is_string($options['bitstring_padding'])) {
            $this->options['bitstring_padding'] = $options['bitstring_padding'];
        }

        return $this;
    }
117494
public function setCommandOptions(array $options)
    {
        foreach ($options as $name => $option) {
            if ((!$option instanceof Parameter\Option)) {
                throw new \Parable\Console\Exception(
                    "Options must be instances of Parameter\\Option. {$name} is not."
                );
            }
            $this->commandOptions[$option->getName()] = $option;
        }
        return $this;
    }