You are here

public function SearchApiQuery::__wakeup in Search API 7

Implements the magic __wakeup() method to reload the query's index.

File

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

Class

SearchApiQuery
Provides a standard implementation of the SearchApiQueryInterface.

Code

public function __wakeup() {
  if (!isset($this->index) && !empty($this->index_id)) {
    $this->index = search_api_index_load($this->index_id);
    unset($this->index_id);
  }
}