abstract class ContainerAware

A simple implementation of ContainerAwareInterface.

@author Fabien Potencier <fabien@symfony.com>

@api

Hierarchy

Expanded class hierarchy of ContainerAware

6 files declare their use of ContainerAware
AccessManager.php in drupal/core/lib/Drupal/Core/Access/AccessManager.php
Contains Drupal\Core\Access\AccessManager.
Bundle.php in drupal/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Bundle/Bundle.php
ExceptionController.php in drupal/core/lib/Drupal/Core/ExceptionController.php
Definition of Drupal\Core\ExceptionController.
MockController.php in drupal/core/modules/system/lib/Drupal/system/Tests/Routing/MockController.php
Definition of Drupal\system\Tests\Routing\MockController.
RequestHandler.php in drupal/core/modules/rest/lib/Drupal/rest/RequestHandler.php
Definition of Drupal\rest\RequestHandler.

... See full list

File

drupal/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/ContainerAware.php, line 21

Namespace

Symfony\Component\DependencyInjection
View source
abstract class ContainerAware implements ContainerAwareInterface {

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

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

}

Members

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