You are here

abstract class ContainerAware in Service Container 7.2

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

ContainerAware is a simple implementation of ContainerAwareInterface.

Hierarchy

Expanded class hierarchy of ContainerAware

1 file declares its use of ContainerAware
ContainerAwarePluginManager.php in src/Plugin/ContainerAwarePluginManager.php
Contains \Drupal\service_container\Plugin\ContainerAwarePluginManager

File

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

Namespace

Drupal\service_container\DependencyInjection
View source
abstract class ContainerAware implements ContainerAwareInterface {

  /**
   * The injected container.
   *
   * @var \Symfony\Component\DependencyInjection\ContainerInterface
   */
  protected $container;

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

}

Members

Namesort descending Modifiers Type Description Overrides
ContainerAware::$container protected property The injected container.
ContainerAware::setContainer public function Sets the Container associated with this service. Overrides ContainerAwareInterface::setContainer