You are here

public function GenericDatabase::getCloneForDatabase in Search API 8

Creates a clone of this service for the given database.

Parameters

\Drupal\Core\Database\Connection $database: A database of a type compatible with this class.

Return value

static A clone of this service class for the given database.

Overrides DatabaseCompatibilityHandlerInterface::getCloneForDatabase

File

modules/search_api_db/src/DatabaseCompatibility/GenericDatabase.php, line 51

Class

GenericDatabase
Represents any database for which no specifics are known.

Namespace

Drupal\search_api_db\DatabaseCompatibility

Code

public function getCloneForDatabase(Connection $database) {
  $service = clone $this;
  $service->database = $database;
  return $service;
}