You are here

public function ContainerBuilder::addDefinitions in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/dependency-injection/ContainerBuilder.php \Symfony\Component\DependencyInjection\ContainerBuilder::addDefinitions()

Adds the service definitions.

Parameters

Definition[] $definitions An array of service definitions:

2 calls to ContainerBuilder::addDefinitions()
ContainerBuilder::merge in vendor/symfony/dependency-injection/ContainerBuilder.php
Merges a ContainerBuilder with the current ContainerBuilder configuration.
ContainerBuilder::setDefinitions in vendor/symfony/dependency-injection/ContainerBuilder.php
Sets the service definitions.

File

vendor/symfony/dependency-injection/ContainerBuilder.php, line 719

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);
  }
}