$filename =
implode('.',
$x);
} return $filename;
} /**
* get Content-Disposition Header string.
*/
private function getContentDisposition(): string
{ $downloadFilename =
$this->
getDownloadFileName();
$utf8Filename =
$downloadFilename;
if (strtoupper($this->charset
) !== 'UTF-8'
) { $utf8Filename =
mb_convert_encoding($downloadFilename, 'UTF-8',
$this->charset
);
} $result =
sprintf('attachment; filename="%s"',
$downloadFilename);
if ($utf8Filename) { $result .= '; filename*=UTF-8\'\'' .
rawurlencode($utf8Filename);
}