Свойство | Type | Description | |
---|---|---|---|
$deleteFileAfterSend | |||
$file | |||
$maxlen | |||
$offset | |||
$trustXSendfileTypeHeader |
Méthode | Description | |
---|---|---|
__construct ( SplFileInfo | string $file, integer $status = 200, array $headers = [], boolean $public = true, null | string $contentDisposition = null, boolean $autoEtag = false, boolean $autoLastModified = true ) | Constructor. | |
create ( SplFileInfo | string $file = null, integer $status = 200, array $headers = [], boolean $public = true, null | string $contentDisposition = null, boolean $autoEtag = false, boolean $autoLastModified = true ) : |
||
deleteFileAfterSend ( boolean $shouldDelete ) : |
If this is set to true, the file will be unlinked after the request is send Note: If the X-Sendfile header is used, the deleteFileAfterSend setting will not be used. | |
getContent ( ) : false | ||
getFile ( ) : |
Gets the file. | |
prepare ( |
||
sendContent ( ) | Sends the file. | |
setAutoEtag ( ) | Automatically sets the ETag header according to the checksum of the file. | |
setAutoLastModified ( ) | Automatically sets the Last-Modified header according the file modification date. | |
setContent ( $content ) | ||
setContentDisposition ( string $disposition, string $filename = '', string $filenameFallback = '' ) : |
Sets the Content-Disposition header with the given filename. | |
setFile ( SplFileInfo | string $file, string $contentDisposition = null, boolean $autoEtag = false, boolean $autoLastModified = true ) : |
Sets the file to stream. | |
trustXSendfileTypeHeader ( ) | Trust X-Sendfile-Type header. |
Méthode | Description | |
---|---|---|
hasValidIfRangeHeader ( $header ) |
public __construct ( SplFileInfo | string $file, integer $status = 200, array $headers = [], boolean $public = true, null | string $contentDisposition = null, boolean $autoEtag = false, boolean $autoLastModified = true ) | ||
$file | SplFileInfo | string | The file to stream |
$status | integer | The response status code |
$headers | array | An array of response headers |
$public | boolean | Files are public by default |
$contentDisposition | null | string | The type of Content-Disposition to set automatically with the filename |
$autoEtag | boolean | Whether the ETag header should be automatically set |
$autoLastModified | boolean | Whether the Last-Modified header should be automatically set |
public static create ( SplFileInfo | string $file = null, integer $status = 200, array $headers = [], boolean $public = true, null | string $contentDisposition = null, boolean $autoEtag = false, boolean $autoLastModified = true ) : |
||
$file | SplFileInfo | string | The file to stream |
$status | integer | The response status code |
$headers | array | An array of response headers |
$public | boolean | Files are public by default |
$contentDisposition | null | string | The type of Content-Disposition to set automatically with the filename |
$autoEtag | boolean | Whether the ETag header should be automatically set |
$autoLastModified | boolean | Whether the Last-Modified header should be automatically set |
Résultat | The created response |
public deleteFileAfterSend ( boolean $shouldDelete ) : |
||
$shouldDelete | boolean | |
Résultat |
public getFile ( ) : |
||
Résultat | The file to stream |
public setAutoEtag ( ) |
public setAutoLastModified ( ) |
public setContentDisposition ( string $disposition, string $filename = '', string $filenameFallback = '' ) : |
||
$disposition | string | ResponseHeaderBag::DISPOSITION_INLINE or ResponseHeaderBag::DISPOSITION_ATTACHMENT |
$filename | string | Optionally use this filename instead of the real name of the file |
$filenameFallback | string | A fallback filename, containing only ASCII characters. Defaults to an automatically encoded filename |
Résultat |
public setFile ( SplFileInfo | string $file, string $contentDisposition = null, boolean $autoEtag = false, boolean $autoLastModified = true ) : |
||
$file | SplFileInfo | string | The file to stream |
$contentDisposition | string | |
$autoEtag | boolean | |
$autoLastModified | boolean | |
Résultat |
public static trustXSendfileTypeHeader ( ) |
protected File,Symfony\Component\HttpFoundation\File $file | ||
Résultat |