private function XmlFileLoader::parseFileToDOM 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::parseFileToDOM()
Parses a XML file to a \DOMDocument.
Parameters
string $file Path to a file:
Return value
\DOMDocument
Throws
InvalidArgumentException When loading of XML file returns error
1 call to XmlFileLoader::parseFileToDOM()
- 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 254
Class
- XmlFileLoader
- XmlFileLoader loads XML files service definitions.
Namespace
Symfony\Component\DependencyInjection\LoaderCode
private function parseFileToDOM($file) {
try {
$dom = XmlUtils::loadFile($file, array(
$this,
'validateSchema',
));
} catch (\InvalidArgumentException $e) {
throw new InvalidArgumentException(sprintf('Unable to parse file "%s".', $file), $e
->getCode(), $e);
}
$this
->validateExtensions($dom, $file);
return $dom;
}