public static function BinaryFileResponse::create in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/http-foundation/BinaryFileResponse.php \Symfony\Component\HttpFoundation\BinaryFileResponse::create()
Parameters
\SplFileInfo|string $file The file to stream:
int $status The response status code:
array $headers An array of response headers:
bool $public Files are public by default:
null|string $contentDisposition The type of Content-Disposition to set automatically with the filename:
bool $autoEtag Whether the ETag header should be automatically set:
bool $autoLastModified Whether the Last-Modified header should be automatically set:
Return value
BinaryFileResponse The created response
Overrides Response::create
4 calls to BinaryFileResponse::create()
- BinaryFileResponseTest::testAcceptRangeNotOverriden in vendor/
symfony/ http-foundation/ Tests/ BinaryFileResponseTest.php - BinaryFileResponseTest::testAcceptRangeOnUnsafeMethods in vendor/
symfony/ http-foundation/ Tests/ BinaryFileResponseTest.php - BinaryFileResponseTest::testConstruction in vendor/
symfony/ http-foundation/ Tests/ BinaryFileResponseTest.php - BinaryFileResponseTest::testXSendfile in vendor/
symfony/ http-foundation/ Tests/ BinaryFileResponseTest.php
File
- vendor/
symfony/ http-foundation/ BinaryFileResponse.php, line 68
Class
- BinaryFileResponse
- BinaryFileResponse represents an HTTP response delivering a file.
Namespace
Symfony\Component\HttpFoundationCode
public static function create($file = null, $status = 200, $headers = array(), $public = true, $contentDisposition = null, $autoEtag = false, $autoLastModified = true) {
return new static($file, $status, $headers, $public, $contentDisposition, $autoEtag, $autoLastModified);
}