You are here

public function ContainerAwareInterface::setContainer in Service Container 7

Same name in this branch
  1. 7 src/DependencyInjection/ContainerAwareInterface.php \Drupal\service_container\DependencyInjection\ContainerAwareInterface::setContainer()
  2. 7 modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/ContainerAwareInterface.php \Symfony\Component\DependencyInjection\ContainerAwareInterface::setContainer()
Same name and namespace in other branches
  1. 7.2 modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/ContainerAwareInterface.php \Symfony\Component\DependencyInjection\ContainerAwareInterface::setContainer()

Sets the Container.

@api

Parameters

ContainerInterface|null $container A ContainerInterface instance or null:

2 methods override ContainerAwareInterface::setContainer()
ContainerAware::setContainer in modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/ContainerAware.php
Sets the Container associated with this Controller.
ZfExtensionManagerSfContainer::setContainer in lib/Drupal/Component/Bridge/ZfExtensionManagerSfContainer.php
Sets the Container.

File

modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/ContainerAwareInterface.php, line 30

Class

ContainerAwareInterface
ContainerAwareInterface should be implemented by classes that depends on a Container.

Namespace

Symfony\Component\DependencyInjection

Code

public function setContainer(ContainerInterface $container = null);