22        if (!is_string(
$xml) || trim(
$xml) === 
'') {
 
   23            throw InvalidArgumentException::invalidType(
'non-empty string', 
$xml);
 
   26        $entityLoader   = libxml_disable_entity_loader(
true);
 
   27        $internalErrors = libxml_use_internal_errors(
true);
 
   28        libxml_clear_errors();
 
   30        $domDocument = self::create();
 
   31        $options     = LIBXML_DTDLOAD | LIBXML_DTDATTR | LIBXML_NONET;
 
   38        libxml_use_internal_errors($internalErrors);
 
   39        libxml_disable_entity_loader($entityLoader);
 
   42            $error = libxml_get_last_error();
 
   43            libxml_clear_errors();
 
   48        libxml_clear_errors();
 
   50        foreach ($domDocument->childNodes as $child) {
 
   51            if ($child->nodeType === XML_DOCUMENT_TYPE_NODE) {
 
   53                    'Dangerous XML detected, DOCTYPE nodes are not allowed in the XML body' 
   68        if (!is_string(
$file)) {
 
   69            throw InvalidArgumentException::invalidType(
'string', 
$file);
 
   72        if (!is_file(
$file)) {
 
   76        if (!is_readable(
$file)) {
 
   85                'Contents of readable file "%s" could not be gotten',
 
   90        if (trim(
$xml) === 
'') {
 
   94        return static::fromString(
$xml);
 
  102        return new \DOMDocument();
 
sprintf('%.4f', $callTime)
if(!isset( $_REQUEST[ 'ReturnTo'])) if(!isset($_REQUEST['AuthId'])) $options
An exception for terminatinating execution or to throw for unit testing.
defined( 'APPLICATION_ENV')||define( 'APPLICATION_ENV'
if(!file_exists("$old.txt")) if( $old===$new) if(file_exists("$new.txt")) $file