You are here

public function SearchApiIndex::datasource in Search API 7

Get the controller object of the data source used by this index.

Return value

SearchApiDataSourceControllerInterface The data source controller for this index.

Throws

SearchApiException If the specified item type or data source doesn't exist or is invalid.

File

includes/index_entity.inc, line 375
Contains SearchApiIndex.

Class

SearchApiIndex
Class representing a search index.

Code

public function datasource() {
  if (!isset($this->datasource)) {
    $this->datasource = search_api_get_datasource_controller($this->item_type);
  }
  return $this->datasource;
}