public DependencySerializationTrait::__wakeup()
File
- core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php, line 46
Class
- DependencySerializationTrait
- Provides dependency injection friendly methods for serialization.
Namespace
Drupal\Core\DependencyInjection
Code
public function __wakeup() { // Tests in isolation potentially unserialize in the parent process. if (isset($GLOBALS['__PHPUNIT_BOOTSTRAP']) && !\Drupal::hasContainer()) { return; } $container = \Drupal::getContainer(); foreach ($this->_serviceIds as $key => $service_id) { $this->$key = $container->get($service_id); } $this->_serviceIds = array(); }
Please login to continue.