Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ReverseContainer.php

function ReverseContainer::__construct

Same name in this branch
  1. 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\DependencyInjection

Code

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);
}
RSS feed
Powered by Drupal