18 if (!isset(
$headers[
'Content-Type'])) {
19 $headers[
'Content-Type'] =
'application/octet-stream; charset=utf-8';
22 if (!isset(
$headers[
'Cache-Control'])) {
23 $headers[
'Cache-Control'] =
'no-store';
26 if (!isset(
$headers[
'Content-Disposition'])) {
27 $headers[
'Content-Disposition'] =
'attachment';
30 if (!empty($this->content) && !isset(
$headers[
'Content-Length'])) {
55 if (isset($this->headers[
'Content-Disposition'])) {
59 $disposition =
$inline ?
'inline' :
'attachment';
62 $disposition .=
"; filename=\"{$filename}\"";
65 $this->headers[
'Content-Disposition'] = $disposition;
getHeaders()
Returns additional response headers.array
setFilename(string $filename= '', bool $inline=false)
Set the filename for the download.
const REFERRER
Used in calls to forward() to specify the browser should be redirected to the referring page...
Download response builder.
setForwardURL(string $forward_url=REFERRER)
Sets redirect URL.Forward URL self