You are here

protected function ContainerBuilder::shareService in Drupal 8

Same name and namespace in other branches
  1. 9 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 54

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;
  }
}