You are here

trait ContainerAwareTrait in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/dependency-injection/ContainerAwareTrait.php \Symfony\Component\DependencyInjection\ContainerAwareTrait

ContainerAware trait.

@author Fabien Potencier <fabien@symfony.com>

Hierarchy

17 files declare their use of ContainerAwareTrait
CacheFactory.php in core/lib/Drupal/Core/Cache/CacheFactory.php
Contains \Drupal\Core\Cache\CacheFactory.
CacheTagsInvalidator.php in core/lib/Drupal/Core/Cache/CacheTagsInvalidator.php
Contains \Drupal\Core\Cache\CacheTagsInvalidator.
ChainedFastBackendFactory.php in core/lib/Drupal/Core/Cache/ChainedFastBackendFactory.php
Contains \Drupal\Core\Cache\ChainedFastBackendFactory.
ClassResolver.php in core/lib/Drupal/Core/DependencyInjection/ClassResolver.php
Contains \Drupal\Core\DependencyInjection\ClassResolver.
ContextualController.php in core/modules/contextual/src/ContextualController.php
Contains \Drupal\contextual\ContextualController.

... See full list

File

vendor/symfony/dependency-injection/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.