You are here

public function Query::__wakeup in Drupal 9

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Database/Query/Query.php \Drupal\Core\Database\Query\Query::__wakeup()
  2. 10 core/lib/Drupal/Core/Database/Query/Query.php \Drupal\Core\Database\Query\Query::__wakeup()

Implements the magic __wakeup function to reconnect to the database.

File

core/lib/Drupal/Core/Database/Query/Query.php, line 95

Class

Query
Base class for query builders.

Namespace

Drupal\Core\Database\Query

Code

public function __wakeup() {
  $this->connection = Database::getConnection($this->connectionTarget, $this->connectionKey);
}