ContentTransferEncoding uses ConstantsTrait
MIME `Content-Transfer-Encoding` values (RFC 2045 §6).
Declares how the body of a part was encoded for transport:
7bit,8bit,binaryare identity encodings — the data is left as-is (only line-length / byte-range guarantees differ).quoted-printableandbase64actually transform the bytes and must be decoded before use.
Tags
Table of Contents
Constants
- BASE64 : string = 'base64'
- `base64` — Binary-safe base64 encoding.
- BINARY : string = 'binary'
- `binary` — Arbitrary bytes with no line-length restriction.
- EIGHT_BIT : string = '8bit'
- `8bit` — 8-bit data, lines ≤ 998 octets.
- QUOTED_PRINTABLE : string = 'quoted-printable'
- `quoted-printable` — Mostly-ASCII text with `=XX` escapes.
- SEVEN_BIT : string = '7bit'
- `7bit` — US-ASCII, lines ≤ 998 octets. The default when absent.
Methods
- isIdentity() : bool
- Whether the encoding leaves the data unchanged (`7bit` / `8bit` / `binary`) and therefore needs no decoding step.
Constants
BASE64
`base64` — Binary-safe base64 encoding.
public
string
BASE64
= 'base64'
BINARY
`binary` — Arbitrary bytes with no line-length restriction.
public
string
BINARY
= 'binary'
EIGHT_BIT
`8bit` — 8-bit data, lines ≤ 998 octets.
public
string
EIGHT_BIT
= '8bit'
QUOTED_PRINTABLE
`quoted-printable` — Mostly-ASCII text with `=XX` escapes.
public
string
QUOTED_PRINTABLE
= 'quoted-printable'
SEVEN_BIT
`7bit` — US-ASCII, lines ≤ 998 octets. The default when absent.
public
string
SEVEN_BIT
= '7bit'
Methods
isIdentity()
Whether the encoding leaves the data unchanged (`7bit` / `8bit` / `binary`) and therefore needs no decoding step.
public
static isIdentity(string $encoding) : bool
Parameters
- $encoding : string
-
One of the class constants (case-insensitive).
Return values
bool —True for an identity encoding, false for quoted-printable / base64.