You are here

ContainerAware.php in Service Container 7

File

src/DependencyInjection/ContainerAware.php
View source
<?php

/**
 * @file
 * Contains \Drupal\service_container\DependencyInjection\ContainerAware
 */
namespace Drupal\service_container\DependencyInjection;

use Symfony\Component\DependencyInjection\ContainerInterface as SymfonyContainerInterface;

/**
 * ContainerAware is a simple implementation of ContainerAwareInterface.
 *
 * @ingroup dic
 */
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;
  }

}

Classes

Namesort descending Description
ContainerAware ContainerAware is a simple implementation of ContainerAwareInterface.