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

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.