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
disposition(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 95
__construct(FileSystem $fileSystem, string $file)
Constructor.
at line 115
File
name(string $name)
Sets the file name.
at line 128
File
disposition(string $disposition)
Sets the content disposition.
at line 141
File
type(string $type)
Sets the content type.
at line 166
protected string
getName()
Returns the file name.
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.