public function Query::__wakeup

7.x query.inc public Query::__wakeup()
8.x Query.php public Query::__wakeup()

Implements the magic __wakeup function to reconnect to the database.

File

drupal/includes/database/query.inc, line 352
Non-specific Database query code. Used by all engines.

Class

Query
Base class for query builders.

Code

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