function Query::__sleep
Same name in other branches
- 9 core/lib/Drupal/Core/Database/Query/Query.php \Drupal\Core\Database\Query\Query::__sleep()
- 8.9.x core/lib/Drupal/Core/Database/Query/Query.php \Drupal\Core\Database\Query\Query::__sleep()
- 10 core/lib/Drupal/Core/Database/Query/Query.php \Drupal\Core\Database\Query\Query::__sleep()
- 11.x core/lib/Drupal/Core/Database/Query/Query.php \Drupal\Core\Database\Query\Query::__sleep()
Implements the magic __sleep function to disconnect from the database.
File
-
includes/
database/ query.inc, line 343
Class
- Query
- Base class for query builders.
Code
public function __sleep() {
$keys = get_object_vars($this);
unset($keys['connection']);
return array_keys($keys);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.