public function Container::set in Zircon Profile 8
Same name in this branch
- 8 vendor/symfony/dependency-injection/Container.php \Symfony\Component\DependencyInjection\Container::set()
- 8 core/lib/Drupal/Core/DependencyInjection/Container.php \Drupal\Core\DependencyInjection\Container::set()
- 8 core/lib/Drupal/Component/DependencyInjection/Container.php \Drupal\Component\DependencyInjection\Container::set()
Same name and namespace in other branches
- 8.0 core/lib/Drupal/Component/DependencyInjection/Container.php \Drupal\Component\DependencyInjection\Container::set()
Sets a service.
Parameters
string $id The service identifier:
object $service The service instance:
string $scope The scope of the service:
Overrides ContainerInterface::set
1 call to Container::set()
- Container::set in core/
lib/ Drupal/ Core/ DependencyInjection/ Container.php - Sets a service.
1 method overrides Container::set()
- Container::set in core/
lib/ Drupal/ Core/ DependencyInjection/ Container.php - Sets a service.
File
- core/
lib/ Drupal/ Component/ DependencyInjection/ Container.php, line 361 - Contains \Drupal\Component\DependencyInjection\Container.
Class
- Container
- Provides a container optimized for Drupal's needs.
Namespace
Drupal\Component\DependencyInjectionCode
public function set($id, $service, $scope = ContainerInterface::SCOPE_CONTAINER) {
$this->services[$id] = $service;
}