Constructor.
SplFileInfo|string $file The file to stream:
integer $status The response status code:
array $headers An array of response headers:
boolean $public Files are public by default:
null|string $contentDisposition The type of Content-Disposition to set automatically with the filename:
boolean $autoEtag Whether the ETag header should be automatically set:
boolean $autoLastModified Whether the Last-Modified header should be automatically set:
Overrides Response::__construct
public function __construct($file, $status = 200, $headers = array(), $public = true, $contentDisposition = null, $autoEtag = false, $autoLastModified = true) {
parent::__construct(null, $status, $headers);
$this
->setFile($file, $contentDisposition, $autoEtag, $autoLastModified);
if ($public) {
$this
->setPublic();
}
}