private function XliffFileLoader::getXmlErrors in Plug 7
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 lib/
Symfony/ translation/ Loader/ XliffFileLoader.php - Validates and parses the given file into a SimpleXMLElement.
File
- lib/
Symfony/ translation/ Loader/ XliffFileLoader.php, line 169
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;
}