Sets a service.
@api
Parameters
string $id The service identifier:
object $service The service instance:
string $scope The scope of the 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);