BinaryFileResponse::trustXSendfileTypeHeader()

static trustXSendfileTypeHeader() Trust X-Sendfile-Type header.

BinaryFileResponse::setFile()

BinaryFileResponse setFile(SplFileInfo|string $file, string $contentDisposition = null, bool $autoEtag = false, bool $autoLastModified = true) Sets the file to stream. Parameters SplFileInfo|string $file The file to stream string $contentDisposition bool $autoEtag bool $autoLastModified Return Value BinaryFileResponse Exceptions FileException

BinaryFileResponse::setContentDisposition()

BinaryFileResponse setContentDisposition(string $disposition, string $filename = '', string $filenameFallback = '') Sets the Content-Disposition header with the given filename. Parameters string $disposition ResponseHeaderBag::DISPOSITIONINLINE or ResponseHeaderBag::DISPOSITIONATTACHMENT 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

BinaryFileResponse::setContent()

Response setContent(mixed $content) Sets the response content. Valid types are strings, numbers, null, and objects that implement a __toString() method. Parameters mixed $content Content that can be cast to string Return Value Response Exceptions UnexpectedValueException

BinaryFileResponse::setAutoLastModified()

setAutoLastModified() Automatically sets the Last-Modified header according the file modification date.

BinaryFileResponse::setAutoEtag()

setAutoEtag() Automatically sets the ETag header according to the checksum of the file.

BinaryFileResponse::sendContent()

Response sendContent() Sends the file. {@inheritdoc} Return Value Response

BinaryFileResponse::prepare()

Response prepare(Request $request) Prepares the Response before it is sent to the client. This method tweaks the Response to ensure that it is compliant with RFC 2616. Most of the changes are based on the Request that is "associated" with this Response. Parameters Request $request A Request instance Return Value Response The current response.

BinaryFileResponse::getFile()

File getFile() Gets the file. Return Value File The file to stream

BinaryFileResponse::getContent()

string getContent() Gets the current response content. Return Value string Content