You are here

public function ContainerAwareTrait::setContainer in Service Container 7

Same name and namespace in other branches
  1. 7.2 modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/ContainerAwareTrait.php \Symfony\Component\DependencyInjection\ContainerAwareTrait::setContainer()

Sets the Container associated with this Controller.

Parameters

ContainerInterface $container A ContainerInterface instance:

File

modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/ContainerAwareTrait.php, line 31

Class

ContainerAwareTrait
ContainerAware trait.

Namespace

Symfony\Component\DependencyInjection

Code

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