Sulu\Bundle\MediaBundle\Media\FormatLoader\BaseXmlFormatLoader::tryLoad PHP Method

tryLoad() private method

Tries to load the DOM Document of a given image formats xml.
private tryLoad ( $file ) : DOMDocument
$file string The path to the xml file
return DOMDocument
    private function tryLoad($file)
    {
        try {
            return XmlUtils::loadFile($file, __DIR__ . static::SCHEME_PATH);
        } catch (\InvalidArgumentException $e) {
            throw new InvalidMediaFormatException(sprintf('Could not parse image formats XML file "%s"', $file), null, $e);
        }
    }