File
class File implements ResponseSenderInterface
File response.
Properties
protected FileSystem | $fileSystem | File system instance. | |
protected string | $filePath | File path. | |
protected int | $fileSize | File size. | |
protected string | $filename | Filename. | |
protected string | $disposition | Content disposition. | |
protected string | $contentType | Content type. | |
protected Closure | $callback | Callback. |
Methods
setDisposition(string $disposition)
Sets the content disposition.
string
getName()
Returns the filename.
string
getDisposition()
Returns the content disposition.
string
getContenType()
Returns the content type.
array|false
calculateRange(string $range)
Calculates the content range that should be served.
sendFile(int $start, int $end)
Sends the file.
Details
at line 93
__construct(FileSystem $fileSystem, string $file)
Constructor.
at line 113
File
setName(string $name)
Sets the filename.
at line 126
File
setDisposition(string $disposition)
Sets the content disposition.
at line 139
File
setType(string $type)
Sets the response content type.
at line 164
protected string
getName()
Returns the filename.
at line 174
protected string
getDisposition()
Returns the content disposition.
at line 184
protected string
getContenType()
Returns the content type.
at line 195
protected array|false
calculateRange(string $range)
Calculates the content range that should be served.
at line 247
protected
sendFile(int $start, int $end)
Sends the file.