Oihana PHP Enums

ContentDisposition uses ConstantsTrait

Enumeration of `Content-Disposition` disposition types.

The disposition type is the first token of a Content-Disposition header value and tells the recipient how the payload should be handled. Parameters such as filename, filename* or name follow the type and are not enumerated here.

Example:

$value = ContentDisposition::ATTACHMENT . '; filename="report.pdf"' ;
$response->withHeader( HttpHeader::CONTENT_DISPOSITION , $value ) ;

References:

  • RFC 6266 (Content-Disposition in HTTP): inline, attachment
  • RFC 7578 (multipart/form-data): form-data
Tags
see
HttpHeader::CONTENT_DISPOSITION
author

Marc Alcaraz (ekameleon)

since
1.1.0

Table of Contents

Constants

ATTACHMENT  : string = 'attachment'
`attachment` — Payload should be downloaded and saved, typically prompting a "Save As" dialog (RFC 6266).
FORM_DATA  : string = 'form-data'
`form-data` — Part of a `multipart/form-data` body, carrying a form field (RFC 7578).
INLINE  : string = 'inline'
`inline` — Payload should be displayed inline, within the page (RFC 6266).

Constants

ATTACHMENT

`attachment` — Payload should be downloaded and saved, typically prompting a "Save As" dialog (RFC 6266).

public string ATTACHMENT = 'attachment'

FORM_DATA

`form-data` — Part of a `multipart/form-data` body, carrying a form field (RFC 7578).

public string FORM_DATA = 'form-data'

INLINE

`inline` — Payload should be displayed inline, within the page (RFC 6266).

public string INLINE = 'inline'
On this page

Search results