function ReverseContainer::__construct
Same name in this branch
- 11.1.x core/lib/Drupal/Component/DependencyInjection/ReverseContainer.php \Drupal\Component\DependencyInjection\ReverseContainer::__construct()
File
-
vendor/
symfony/ dependency-injection/ ReverseContainer.php, line 26
Class
- ReverseContainer
- Turns public and "container.reversible" services back to their ids.
Namespace
Symfony\Component\DependencyInjectionCode
public function __construct(Container $serviceContainer, ContainerInterface $reversibleLocator, string $tagName = 'container.reversible') {
$this->getServiceId = \Closure::bind(fn(object $service): ?string => (array_search($service, $this->services, true) ?: array_search($service, $this->privates, true)) ?: null, $serviceContainer, Container::class);
}