You are here

public function ContainerAware::setContainer in Service Container 7.2

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

Sets the Container associated with this service.

Parameters

\Symfony\Component\DependencyInjection\ContainerInterface|null $container: A ContainerInterface instance or NULL to be injected in the service.

Overrides ContainerAwareInterface::setContainer

File

src/DependencyInjection/ContainerAware.php, line 29
Contains \Drupal\service_container\DependencyInjection\ContainerAware

Class

ContainerAware
ContainerAware is a simple implementation of ContainerAwareInterface.

Namespace

Drupal\service_container\DependencyInjection

Code

public function setContainer(SymfonyContainerInterface $container = null) {
  $this->container = $container;
}