You are here

public function SearchApiQuery::setOption in Search API 7

Sets an option for this search query.

Parameters

string $name: The name of an option.

mixed $value: The new value of the option.

Return value

mixed The option's previous value.

Overrides SearchApiQueryInterface::setOption

File

includes/query.inc, line 798
Contains SearchApiQueryInterface and SearchApiQuery.

Class

SearchApiQuery
Provides a standard implementation of the SearchApiQueryInterface.

Code

public function setOption($name, $value) {
  $old = $this
    ->getOption($name);
  $this->options[$name] = $value;
  return $old;
}