catch (\Exception
$exception) { throw $exception;
} $header =
$reader->
getHeader();
if (!
$header) { throw new \
Exception('Missing or malformed header.'
);
} // Initialize the database writer.
$writer =
new PoDatabaseWriter();
$writer->
setLangcode($file->langcode
);
$writer_options =
[ 'overwrite_options' =>
$options['overwrite_options'
],
'customized' =>
$options['customized'
],
];
$writer->
setOptions($writer_options);
$writer->
setHeader($header);
// Attempt to pipe all items from the file to the database.
try { if ($options['seek'
]) {