private function XmlFileLoader::parseFileToDOM in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/symfony/dependency-injection/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 vendor/
symfony/ dependency-injection/ Loader/ XmlFileLoader.php
File
- vendor/
symfony/ dependency-injection/ Loader/ XmlFileLoader.php, line 253
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;
}