You are here

public function Query::__clone in Search API 8

Implements the magic __clone() method to properly clone nested objects.

File

src/Query/Query.php, line 792

Class

Query
Provides a standard implementation for a Search API query.

Namespace

Drupal\search_api\Query

Code

public function __clone() {
  $this->results = $this
    ->getResults()
    ->getCloneForQuery($this);
  $this->conditionGroup = clone $this->conditionGroup;
  if ($this->originalQuery) {
    $this->originalQuery = clone $this->originalQuery;
  }
  if ($this->parseMode) {
    $this->parseMode = clone $this->parseMode;
  }
}