You are here

trait ContainerAwareTrait in Service Container 7.2

Same name and namespace in other branches
  1. 7 modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/ContainerAwareTrait.php \Symfony\Component\DependencyInjection\ContainerAwareTrait

ContainerAware trait.

@author Fabien Potencier <fabien@symfony.com>

Hierarchy

1 file declares its use of ContainerAwareTrait
ClassResolver.php in lib/Drupal/Core/DependencyInjection/ClassResolver.php
Contains \Drupal\Core\DependencyInjection\ClassResolver.

File

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

Namespace

Symfony\Component\DependencyInjection
View source
trait ContainerAwareTrait {

  /**
   * @var ContainerInterface
   */
  protected $container;

  /**
   * Sets the Container associated with this Controller.
   *
   * @param ContainerInterface $container A ContainerInterface instance
   */
  public function setContainer(ContainerInterface $container = null) {
    $this->container = $container;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
ContainerAwareTrait::$container protected property
ContainerAwareTrait::setContainer public function Sets the Container associated with this Controller.