You are here

protected function ContainerBuilder::shareService in Drupal 9

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/DependencyInjection/ContainerBuilder.php \Drupal\Core\DependencyInjection\ContainerBuilder::shareService()

A 1to1 copy of parent::shareService.

@todo https://www.drupal.org/project/drupal/issues/2937010 Since Symfony 3.4 this is not a 1to1 copy.

File

core/lib/Drupal/Core/DependencyInjection/ContainerBuilder.php, line 56

Class

ContainerBuilder
Drupal's dependency injection container builder.

Namespace

Drupal\Core\DependencyInjection

Code

protected function shareService(Definition $definition, $service, $id, array &$inlineServices) {
  if ($definition
    ->isShared()) {
    $this->services[$lowerId = strtolower($id)] = $service;
  }
}