function Container::__sleep

Same name in other branches
  1. 9 core/lib/Drupal/Core/DependencyInjection/Container.php \Drupal\Core\DependencyInjection\Container::__sleep()
  2. 8.9.x core/lib/Drupal/Core/DependencyInjection/Container.php \Drupal\Core\DependencyInjection\Container::__sleep()
  3. 11.x core/lib/Drupal/Core/DependencyInjection/Container.php \Drupal\Core\DependencyInjection\Container::__sleep()

File

core/lib/Drupal/Core/DependencyInjection/Container.php, line 15

Class

Container
Extends the container to prevent serialization.

Namespace

Drupal\Core\DependencyInjection

Code

public function __sleep() {
    assert(FALSE, 'The container was serialized.');
    return array_keys(get_object_vars($this));
}

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