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()

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