Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Settings.php

function 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.');
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal