public function ContainerInterface::set

Sets a service.

@api

Parameters

string $id The service identifier:

object $service The service instance:

string $scope The scope of the service:

1 method overrides ContainerInterface::set()
Container::set in drupal/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Container.php
Sets a service.

File

drupal/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/ContainerInterface.php, line 41

Class

ContainerInterface
ContainerInterface is the interface implemented by service container classes.

Namespace

Symfony\Component\DependencyInjection

Code

public function set($id, $service, $scope = self::SCOPE_CONTAINER);