protected function getImportedTargets(JobInterface $job) {
if (empty($this->importedXML)) {
return FALSE;
}
if (empty($this->importedTransUnits)) {
$reader = new \XMLReader();
foreach ($this->importedXML
->xpath('//xliff:trans-unit') as $unit) {
if (!$job
->getSetting('xliff_processing')) {
$this->importedTransUnits[(string) $unit['id']]['#text'] = (string) $unit->target;
continue;
}
$reader
->XML($unit->target
->asXML());
$reader
->read();
$this->importedTransUnits[(string) $unit['id']]['#text'] = $this
->processForImport($reader
->readInnerXML(), $job);
}
}
return $this->importedTransUnits;
}