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 | File name. | |
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 file name.
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 96
__construct(FileSystem $fileSystem, string $file)
Constructor.
at line 116
File
setName(string $name)
Sets the file name.
at line 129
File
setDisposition(string $disposition)
Sets the content disposition.
at line 142
File
setType(string $type)
Sets the content type.
at line 167
protected string
getName()
Returns the file name.
at line 177
protected string
getDisposition()
Returns the content disposition.
at line 187
protected string
getContenType()
Returns the content type.
at line 198
protected array|false
calculateRange(string $range)
Calculates the content range that should be served.
at line 250
protected
sendFile(int $start, int $end)
Sends the file.