You are here

public function ContainerBuilder::addDefinitions in Service Container 7

Same name and namespace in other branches
  1. 7.2 modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/ContainerBuilder.php \Symfony\Component\DependencyInjection\ContainerBuilder::addDefinitions()

Adds the service definitions.

@api

Parameters

Definition[] $definitions An array of service definitions:

2 calls to ContainerBuilder::addDefinitions()
ContainerBuilder::merge in modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/ContainerBuilder.php
Merges a ContainerBuilder with the current ContainerBuilder configuration.
ContainerBuilder::setDefinitions in modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/ContainerBuilder.php
Sets the service definitions.

File

modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/ContainerBuilder.php, line 781

Class

ContainerBuilder
ContainerBuilder is a DI container that provides an API to easily describe services.

Namespace

Symfony\Component\DependencyInjection

Code

public function addDefinitions(array $definitions) {
  foreach ($definitions as $id => $definition) {
    $this
      ->setDefinition($id, $definition);
  }
}