FileResponseOption uses ConstantsTrait
Enumeration of the option keys accepted by the file/binary response helpers (e.g. {@see FileTrait::fileResponse()}).
These keys drive which content headers a download response emits.
Tags
Table of Contents
Constants
- CONTENT_DISPOSITION : string = 'contentDisposition'
- The `Content-Disposition` header value to send when {@see self::USE_CONTENT_DISPOSITION} is enabled.
- FORMAT : string = 'format'
- The output format (e.g. `jpg`) used to build the `image/<format>` content type. Default: `jpg`.
- USE_CONTENT_DISPOSITION : string = 'useContentDisposition'
- Whether to add a `Content-Disposition` header to the response. Default: false.
- USE_CONTENT_LENGTH : string = 'useContentLength'
- Whether to add a `Content-Length` header (the file size) to the response. Default: false.
- USE_CONTENT_TYPE : string = 'useContentType'
- Whether to add a `Content-Type` header (the detected MIME type) to the response. Default: false.
Constants
CONTENT_DISPOSITION
The `Content-Disposition` header value to send when {@see self::USE_CONTENT_DISPOSITION} is enabled.
public
string
CONTENT_DISPOSITION
= 'contentDisposition'
FORMAT
The output format (e.g. `jpg`) used to build the `image/<format>` content type. Default: `jpg`.
public
string
FORMAT
= 'format'
USE_CONTENT_DISPOSITION
Whether to add a `Content-Disposition` header to the response. Default: false.
public
string
USE_CONTENT_DISPOSITION
= 'useContentDisposition'
USE_CONTENT_LENGTH
Whether to add a `Content-Length` header (the file size) to the response. Default: false.
public
string
USE_CONTENT_LENGTH
= 'useContentLength'
USE_CONTENT_TYPE
Whether to add a `Content-Type` header (the detected MIME type) to the response. Default: false.
public
string
USE_CONTENT_TYPE
= 'useContentType'