private function XmlFileLoader::parseImports in Service Container 7.2
Same name and namespace in other branches
- 7 modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php \Symfony\Component\DependencyInjection\Loader\XmlFileLoader::parseImports()
Parses imports.
Parameters
\DOMDocument $xml:
string $file:
1 call to XmlFileLoader::parseImports()
- XmlFileLoader::load in modules/
providers/ service_container_symfony/ lib/ Symfony/ Component/ DependencyInjection/ Loader/ XmlFileLoader.php
File
- modules/
providers/ service_container_symfony/ lib/ Symfony/ Component/ DependencyInjection/ Loader/ XmlFileLoader.php, line 88
Class
- XmlFileLoader
- XmlFileLoader loads XML files service definitions.
Namespace
Symfony\Component\DependencyInjection\LoaderCode
private function parseImports(\DOMDocument $xml, $file) {
$xpath = new \DOMXPath($xml);
$xpath
->registerNamespace('container', self::NS);
if (false === ($imports = $xpath
->query('//container:imports/container:import'))) {
return;
}
foreach ($imports as $import) {
$this
->setCurrentDir(dirname($file));
$this
->import($import
->getAttribute('resource'), null, (bool) XmlUtils::phpize($import
->getAttribute('ignore-errors')), $file);
}
}