function LazyService::lazyLoadItself
Same name and namespace in other branches
- 11.x core/tests/Drupal/Tests/ProxyClass/Core/DependencyInjection/Fixture/LazyService.php \Drupal\Tests\ProxyClass\Core\DependencyInjection\Fixture\LazyService::lazyLoadItself()
Lazy loads the real service from the container.
Return value
object Returns the constructed real service.
File
-
core/
tests/ Drupal/ Tests/ ProxyClass/ Core/ DependencyInjection/ Fixture/ LazyService.php, line 59
Class
- LazyService
- Provides a proxy class for \Drupal\Tests\Core\DependencyInjection\Fixture\LazyService.
Namespace
Drupal\Tests\ProxyClass\Core\DependencyInjection\FixtureCode
protected function lazyLoadItself() {
if (!isset($this->service)) {
$this->service = $this->container
->get($this->drupalProxyOriginalServiceId);
}
return $this->service;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.