IHeader
in
A mime email header line consisting of a name and value.
The header object provides methods to access the header's name, raw value, and also its parsed value. The parsed value will depend on the type of header and in some cases may be broken up into other parts (for example email addresses in an address header, or parameters in a parameter header).
Tags
Table of Contents
- __toString() : string
- Returns the string representation of the header.
- getName() : string
- Returns the name of the header.
- getParts() : array<string|int, IHeaderPart>
- Returns an array of IHeaderPart objects the header's value has been parsed into.
- getRawValue() : string
- Returns the raw value of the header.
- getValue() : string
- Returns the parsed 'value' of the header.
Methods
__toString()
Returns the string representation of the header.
public
__toString() : string
i.e.: '<HeaderName>: <RawValue>'
Return values
string —The string representation.
getName()
Returns the name of the header.
public
getName() : string
Return values
string —The name.
getParts()
Returns an array of IHeaderPart objects the header's value has been parsed into.
public
getParts() : array<string|int, IHeaderPart>
Return values
array<string|int, IHeaderPart> —The array of parts.
getRawValue()
Returns the raw value of the header.
public
getRawValue() : string
Return values
string —The raw value.
getValue()
Returns the parsed 'value' of the header.
public
getValue() : string
For headers that contain multiple parts, like address headers (To, From) or parameter headers (Content-Type), the 'value' is the value of the first parsed part.
Return values
string —The value