public DependencySerializationTrait::__wakeup()
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(); }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!DependencyInjection!DependencySerializationTrait.php/function/DependencySerializationTrait::__wakeup/8.1.x