private function XliffFileLoader::getXmlErrors in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/symfony/translation/Loader/XliffFileLoader.php \Symfony\Component\Translation\Loader\XliffFileLoader::getXmlErrors()
Returns the XML errors of the internal XML parser.
Parameters
bool $internalErrors:
Return value
array An array of errors
1 call to XliffFileLoader::getXmlErrors()
- XliffFileLoader::parseFile in vendor/
symfony/ translation/ Loader/ XliffFileLoader.php - Validates and parses the given file into a SimpleXMLElement.
File
- vendor/
symfony/ translation/ Loader/ XliffFileLoader.php, line 165
Class
- XliffFileLoader
- XliffFileLoader loads translations from XLIFF files.
Namespace
Symfony\Component\Translation\LoaderCode
private function getXmlErrors($internalErrors) {
$errors = array();
foreach (libxml_get_errors() as $error) {
$errors[] = sprintf('[%s %s] %s (in %s - line %d, column %d)', LIBXML_ERR_WARNING == $error->level ? 'WARNING' : 'ERROR', $error->code, trim($error->message), $error->file ?: 'n/a', $error->line, $error->column);
}
libxml_clear_errors();
libxml_use_internal_errors($internalErrors);
return $errors;
}