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 95
__construct(FileSystem $fileSystem, string $file)
Constructor.
at line 115
File
setName(string $name)
Sets the filename.
at line 128
File
setDisposition(string $disposition)
Sets the content disposition.
at line 141
File
setType(string $type)
Sets the response content type.
at line 166
protected string
getName()
Returns the filename.
at line 176
protected string
getDisposition()
Returns the content disposition.
at line 186
protected string
getContenType()
Returns the content type.
at line 197
protected array|false
calculateRange(string $range)
Calculates the content range that should be served.
at line 249
protected
sendFile(int $start, int $end)
Sends the file.