public function Database::__wakeup in Search API 8
Implements the magic __wakeup() method.
Reloads the database connection and logger.
Overrides BackendPluginBase::__wakeup
File
- modules/
search_api_db/ src/ Plugin/ search_api/ backend/ Database.php, line 2869
Class
- Database
- Indexes and searches items using the database.
Namespace
Drupal\search_api_db\Plugin\search_api\backendCode
public function __wakeup() {
parent::__wakeup();
if (isset($this->configuration['database'])) {
list($key, $target) = explode(':', $this->configuration['database'], 2);
$this->database = CoreDatabase::getConnection($target, $key);
}
}