VERSION
VERSION
This class represents the collection of header values for a single mail message part.
It supports the base e-mail spec (RFC 5322) and the MIME extensions to that spec (RFC 2045).
toArray(array $opts = array()) : array
Returns the headers in array format.
array | $opts | Optional parameters: - broken_rfc2231: (boolean) Attempt to work around non-RFC 2231-compliant MUAs by generating both a RFC 2047-like parameter name and also the correct RFC 2231 parameter DEFAULT: false - canonical: (boolean) Use canonical (RFC 822/2045) CRLF EOLs? DEFAULT: Uses "\n" - charset: (string) Encodes the headers using this charset. If empty, encodes using UTF-8. DEFAULT: No encoding. - defserver: (string) The default domain to append to mailboxes. DEFAULT: No default name. - lang: (string) The language to use when encoding. DEFAULT: None specified - nowrap: (integer) Don't wrap the headers. DEFAULT: Headers are wrapped. |
The headers in array format. Keys are header names, but case sensitivity cannot be guaranteed. Values are header values.
None found |
toString(array $opts = array()) : string
Returns all headers concatenated into a single string.
array | $opts | See toArray(). |
The headers in string format.
None found |
addHeader(string $header, string $value, array $opts = array())
Add/append/replace a header.
string | $header | The header name. |
string | $value | The header value (UTF-8). |
array | $opts | DEPRECATED |
None found |
addHeaderOb(\Horde_Mime_Headers_Element $ob, boolean $check = false)
Add a Horde_Mime_Headers_Element object to the current header list.
\Horde_Mime_Headers_Element | $ob | Header object to add. |
boolean | $check | Check that the header and object type match? |
since | 2.5.0 |
---|
getHeader(string $header) : \Horde_Mime_Headers_Element
Get a header from the header array.
string | $header | The header name. |
Element object, or null if not found.
None found |
removeHeader(string $header)
Remove a header from the header array.
string | $header | The header name. |
None found |
parseHeaders(mixed $text) : \Horde_Mime_Headers
Builds a Horde_Mime_Headers object from header text.
mixed | $text | A text string (or, as of 2.3.0, a Horde_Stream object or stream resource) containing the headers. |
A new Horde_Mime_Headers object.
None found |
unserialize(string $data)
Unserialization.
string | $data | Serialized data. |
None found |
offsetExists( $offset) : boolean
Does header exist?
$offset |
True if header exists.
since | 2.5.0 |
---|
offsetGet( $offset) : \Horde_Mime_Headers_Element
Return header element object.
$offset |
Element object, or null if not found.
since | 2.5.0 |
---|
offsetSet(string $offset, $value)
Store a header element object.
string | $offset | Not used. |
$value |
since | 2.5.0 |
---|
offsetUnset(string $offset)
Remove a header element object.
string | $offset | Header name. |
since | 2.5.0 |
---|
None found |