You are here

private function YamlFileLoader::parseDefinitions in Zircon Profile 8.0

Same name in this branch
  1. 8.0 vendor/symfony/dependency-injection/Loader/YamlFileLoader.php \Symfony\Component\DependencyInjection\Loader\YamlFileLoader::parseDefinitions()
  2. 8.0 core/lib/Drupal/Core/DependencyInjection/YamlFileLoader.php \Drupal\Core\DependencyInjection\YamlFileLoader::parseDefinitions()
Same name and namespace in other branches
  1. 8 vendor/symfony/dependency-injection/Loader/YamlFileLoader.php \Symfony\Component\DependencyInjection\Loader\YamlFileLoader::parseDefinitions()

Parses definitions.

Parameters

array $content:

string $file:

1 call to YamlFileLoader::parseDefinitions()
YamlFileLoader::load in vendor/symfony/dependency-injection/Loader/YamlFileLoader.php

File

vendor/symfony/dependency-injection/Loader/YamlFileLoader.php, line 114

Class

YamlFileLoader
YamlFileLoader loads YAML files service definitions.

Namespace

Symfony\Component\DependencyInjection\Loader

Code

private function parseDefinitions($content, $file) {
  if (!isset($content['services'])) {
    return;
  }
  if (!is_array($content['services'])) {
    throw new InvalidArgumentException(sprintf('The "services" key should contain an array in %s. Check your YAML syntax.', $file));
  }
  foreach ($content['services'] as $id => $service) {
    $this
      ->parseDefinition($id, $service, $file);
  }
}