You are here

public function SearchApiDbService::__construct in Search API Database Search 7

Implements SearchApiServiceInterface::__construct().

The default implementation sets $this->server and $this->options.

Overrides SearchApiAbstractService::__construct

File

./service.inc, line 67
Contains SearchApiDbService.

Class

SearchApiDbService
Indexes and searches items using the database.

Code

public function __construct(SearchApiServer $server) {
  parent::__construct($server);
  if (isset($this->options['database'])) {
    list($key, $target) = explode(':', $this->options['database'], 2);
    $this->connection = Database::getConnection($target, $key);
  }
}