Symfony\Component\HttpFoundation\BinaryFileResponse::__construct
Constructor.
Signature
public function __construct(SplFileInfo|string
$file,
[integer
$status = 200,
[array
$headers = true,
[boolean
$public = true,
[null|string
$contentDisposition = null,
[boolean
$autoEtag = false,
[boolean
$autoLastModified = true]]]]]] )
Parameters
$file
—
object
- The file to stream
$status
—
integer
- The response status code
$headers
—
array
- An array of response headers
$public
—
boolean
- Files are public by default
$contentDisposition
—
object
- The type of Content-Disposition to set automatically with the filename
$autoEtag
—
boolean
- Whether the ETag header should be automatically set
$autoLastModified
—
boolean
- Whether the Last-Modified header should be automatically set