final class FileResponse implements Response

File download response.

Properties

$resuming

Methods

__construct(string $file, string|null $name = null, string|null $contentType = null, bool $forceDownload = true)

No description

string
getFile()

Returns the path to a downloaded file.

string
getName()

Returns the file name.

string
getContentType()

Returns the MIME content type of a downloaded file.

void
send(IRequest $httpRequest, IResponse $httpResponse)

Sends response to output.

Details

at line 27
__construct(string $file, string|null $name = null, string|null $contentType = null, bool $forceDownload = true)

No description

Parameters

string $file
string|null $name
string|null $contentType
bool $forceDownload

at line 47
string getFile()

Returns the path to a downloaded file.

Return Value

string

at line 56
string getName()

Returns the file name.

Return Value

string

at line 65
string getContentType()

Returns the MIME content type of a downloaded file.

Return Value

string

at line 74
void send(IRequest $httpRequest, IResponse $httpResponse)

Sends response to output.

Parameters

IRequest $httpRequest
IResponse $httpResponse

Return Value

void