You are here

interface ServiceProviderInterface in Service Container 7.2

Same name in this branch
  1. 7.2 src/DependencyInjection/ServiceProviderInterface.php \Drupal\service_container\DependencyInjection\ServiceProviderInterface
  2. 7.2 lib/Drupal/Core/DependencyInjection/ServiceProviderInterface.php \Drupal\Core\DependencyInjection\ServiceProviderInterface
Same name and namespace in other branches
  1. 7 src/DependencyInjection/ServiceProviderInterface.php \Drupal\service_container\DependencyInjection\ServiceProviderInterface

Defines render cache service provider objects.

Those can be used for creating a service container definition.

Hierarchy

Expanded class hierarchy of ServiceProviderInterface

All classes that implement ServiceProviderInterface

6 files declare their use of ServiceProviderInterface
CachedContainerBuilderTest.php in tests/src/DependencyInjection/CachedContainerBuilderTest.php
Contains \Drupal\Tests\service_container\DependencyInjection\CachedContainerBuilderTest
ContainerBuilderTest.php in tests/src/DependencyInjection/ContainerBuilderTest.php
Contains \Drupal\Tests\service_container\DependencyInjection\ContainerBuilderTest
ServiceContainerServiceProvider.php in src/ServiceContainer/ServiceProvider/ServiceContainerServiceProvider.php
Contains \Drupal\service_container\ServiceContainer\ServiceProvider\ServiceContainerServiceProvider
ServiceContainerServiceProvider.php in tests/modules/service_container_test_ctools/src/ServiceContainer/ServiceProvider/ServiceContainerServiceProvider.php
Contains \Drupal\service_container_test_ctools\ServiceContainer\ServiceProvider\ServiceContainerServiceProvider.
ServiceContainerServiceProvider.php in tests/modules/service_container_test/src/ServiceContainer/ServiceProvider/ServiceContainerServiceProvider.php
Contains \Drupal\service_container_test\ServiceContainer\ServiceProvider\ServiceContainerServiceProvider.

... See full list

File

src/DependencyInjection/ServiceProviderInterface.php, line 14
Contains \Drupal\service_container\DependencyInjection\ServiceProviderInterface

Namespace

Drupal\service_container\DependencyInjection
View source
interface ServiceProviderInterface {

  /**
   * Gets a service container definition.
   *
   * @return array
   *   Returns an associative array with the following keys:
   *     - parameters: Simple key-value store of container parameters
   *     - services: Services like defined in services.yml
   *   factory methods, arguments and tags are supported for services.
   *
   *   @see core.services.yml in Drupal 8
   */
  public function getContainerDefinition();

  /**
   * Allows to alter the container definition.
   *
   * @param array $container_definition
   *   An associative array with the following keys:
   *     - parameters: Simple key-value store of container parameters.
   *     - services: Services like defined in services.yml
   *     - tags: Associative array keyed by tag names with
   *             array('service_name' => $tag_args) as values.
   *
   * @see ServiceProviderInterface::getContainerDefinition()
   */
  public function alterContainerDefinition(&$container_definition);

}

Members

Namesort descending Modifiers Type Description Overrides
ServiceProviderInterface::alterContainerDefinition public function Allows to alter the container definition. 4
ServiceProviderInterface::getContainerDefinition public function Gets a service container definition. 4