private function extract(\DOMDocument
$dom, MessageCatalogue
$catalogue, string
$domain): void
{ $xliffVersion = XliffUtils::
getVersionNumber($dom);
if ('1.2' ===
$xliffVersion) { $this->
extractXliff1($dom,
$catalogue,
$domain);
} if ('2.0' ===
$xliffVersion) { $this->
extractXliff2($dom,
$catalogue,
$domain);
} } /**
* Extract messages and metadata from DOMDocument into a MessageCatalogue.
*/
private function extractXliff1(\DOMDocument
$dom, MessageCatalogue
$catalogue, string
$domain): void
{ $xml =
simplexml_import_dom($dom);
$encoding =
$dom->encoding ?
strtoupper($dom->encoding
) : null;