function Settings::__sleep

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Site/Settings.php \Drupal\Core\Site\Settings::__sleep()
  2. 8.9.x core/lib/Drupal/Core/Site/Settings.php \Drupal\Core\Site\Settings::__sleep()
  3. 10 core/lib/Drupal/Core/Site/Settings.php \Drupal\Core\Site\Settings::__sleep()

Prevents settings from being serialized.

File

core/lib/Drupal/Core/Site/Settings.php, line 85

Class

Settings
Read only settings that are initialized with the class.

Namespace

Drupal\Core\Site

Code

public function __sleep() : array {
    throw new \LogicException('Settings can not be serialized. This probably means you are serializing an object that has an indirect reference to the Settings object. Adjust your code so that is not necessary.');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.