public function BinaryFileResponse::setContentDisposition in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/http-foundation/BinaryFileResponse.php \Symfony\Component\HttpFoundation\BinaryFileResponse::setContentDisposition()
Sets the Content-Disposition header with the given filename.
Parameters
string $disposition ResponseHeaderBag::DISPOSITION_INLINE or ResponseHeaderBag::DISPOSITION_ATTACHMENT:
string $filename Optionally use this filename instead of the real name of the file:
string $filenameFallback A fallback filename, containing only ASCII characters. Defaults to an automatically encoded filename:
Return value
1 call to BinaryFileResponse::setContentDisposition()
- BinaryFileResponse::setFile in vendor/
symfony/ http-foundation/ BinaryFileResponse.php - Sets the file to stream.
File
- vendor/
symfony/ http-foundation/ BinaryFileResponse.php, line 155
Class
- BinaryFileResponse
- BinaryFileResponse represents an HTTP response delivering a file.
Namespace
Symfony\Component\HttpFoundationCode
public function setContentDisposition($disposition, $filename = '', $filenameFallback = '') {
if ($filename === '') {
$filename = $this->file
->getFilename();
}
$dispositionHeader = $this->headers
->makeDisposition($disposition, $filename, $filenameFallback);
$this->headers
->set('Content-Disposition', $dispositionHeader);
return $this;
}