private function YamlFileLoader::parseDefinitions
private YamlFileLoader::parseDefinitions($content, $file)
Parses definitions
Parameters
array $content:
string $file:
File
- core/lib/Drupal/Core/DependencyInjection/YamlFileLoader.php, line 104
Class
- YamlFileLoader
- YamlFileLoader loads YAML files service definitions.
Namespace
Drupal\Core\DependencyInjectionCode
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); } }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!DependencyInjection!YamlFileLoader.php/function/YamlFileLoader::parseDefinitions/8.1.x