src/Application/Config.php
private function dumpXmlErrors($xmlFile) {

		$severity = [LIBXML_ERR_WARNING => 'Warning', LIBXML_ERR_ERROR => 'Error', LIBXML_ERR_FATAL => 'Fatal'];
		$errors = [];

		foreach(libxml_get_errors() as $error) {
			$errors[] = sprintf("Row %d, column %d: %s (%d) %s", $error->line, $error->column, $severity[$error->level], $error->code, $error->message);
		}

		throw new ConfigException(sprintf("Could not parse XML configuration in '%s'.\n\n%s", $xmlFile, implode("\n", $errors)));

	}
private function dumpXmlErrors($xmlFile) {

		$severity = [LIBXML_ERR_WARNING => 'Warning', LIBXML_ERR_ERROR => 'Error', LIBXML_ERR_FATAL => 'Fatal'];
		$errors = [];

		foreach(libxml_get_errors() as $error) {
			$errors[] = sprintf("Row %d, column %d: %s (%d) %s", $error->line, $error->column, $severity[$error->level], $error->code, $error->message);
		}

		throw new ConfigException(sprintf("Could not parse XML configuration in '%s'.\n\n%s", $xmlFile, implode("\n", $errors)));

	}
private function dumpXmlErrors ( $ xmlFile ) { $ severity = [ LIBXML_ERR_WARNING => 'Warning' , LIBXML_ERR_ERROR => 'Error' , LIBXML_ERR_FATAL => 'Fatal' ] ; $ errors = [ ] ; foreach ( libxml_get_errors ( ) as $ error ) { $ errors [ ] = sprintf ( "Row %d, column %d: %s (%d) %s" , $ error -> line , $ error -> column , $ severity [ $ error -> level ] , $ error -> code , $ error -> message ) ; } throw new ConfigException ( sprintf ( "Could not parse XML configuration in '%s'.\n\n%s" , $ xmlFile , implode ( "\n" , $ errors ) ) ) ; }
Create formatted output of XML errors

@param string $xmlFile
@throws ConfigException
Create formatted output of XML errors