Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Loader.php

function Loader::loadFile

Throws

XmlException

File

vendor/phpunit/phpunit/src/Util/Xml/Loader.php, line 33

Class

Loader
@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit

Namespace

PHPUnit\Util\Xml

Code

public function loadFile(string $filename) : DOMDocument {
    $reporting = error_reporting(0);
    $contents = file_get_contents($filename);
    error_reporting($reporting);
    if ($contents === false) {
        throw new XmlException(sprintf('Could not read XML from file "%s"', $filename));
    }
    return $this->load($contents, $filename);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal