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
1 2 3 4 5 6 7 8 9 10 11 | 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.