addHeader()
addHeaderLine()
addHeaders()
clearHeaders()
count()
current()
forceLoading()
fromString()
get()
getEncoding()
getPluginClassLoader()
has()
key()
next()
removeHeader()
rewind()
setEncoding()
setPluginClassLoader()
toArray()
toString()
valid()
lazyLoadHeader()
normalizeFieldName()
$encoding
$headers
$headersKeys
$pluginClassLoader
EOL
FOLDING
Basic mail headers collection functionality
Handles aggregation of headers
addHeader(\Zend\Mail\Header\HeaderInterface $header) : \Zend\Mail\Headers
addHeaderLine(string $headerFieldNameOrLine, string $fieldValue) : \Zend\Mail\Headers
This method allows for lazy-loading in that the parsing and instantiation of HeaderInterface object will be delayed until they are retrieved by either get() or current()
string
stringoptional
\Zend\Mail\Exception\InvalidArgumentException |
|---|
addHeaders(array | \Traversable $headers) : \Zend\Mail\Headers
Expects an array (or Traversable object) of type/value pairs.
array\Traversable
\Zend\Mail\Exception\InvalidArgumentException |
|---|
count() : int
If you need an exact count, iterate
intcount of currently known headerscurrent() : \Zend\Mail\Header\HeaderInterface
forceLoading() : bool
boolfromString(string $string, string $EOL) : \Zend\Mail\Headers
Parses a string for headers, and aggregates them, in order, in the current instance, primarily as strings until they are needed (they will be lazy loaded)
string
stringEOL string; defaults to {@link EOL}
\Zend\Mail\Exception\RuntimeException |
|---|
get(string $name) : bool | \ArrayIterator | \Zend\Mail\Header\HeaderInterface
string
bool\ArrayIterator\Zend\Mail\Header\HeaderInterfaceReturns false if there is no headers with $name in this contain, an ArrayIterator if the header is a MultipleHeadersInterface instance and finally returns HeaderInterface for the rest of cases.getEncoding() : string
stringgetPluginClassLoader() : \Zend\Loader\PluginClassLocator
has(string $name) : bool
string
boolkey() : mixed
mixednext()
removeHeader(string | \Zend\Mail\Header\HeaderInterface $instanceOrFieldName) : bool
string\Zend\Mail\Header\HeaderInterfacefield name or specific header instance to remove
boolrewind()
setPluginClassLoader(\Zend\Loader\PluginClassLocator $pluginClassLoader) : \Zend\Mail\Headers
toArray() : array
| todo | determine how to produce single line headers, if they are supported |
|---|
arraytoString() : string
This method handles the normal iteration of headers; it is up to the concrete classes to prepend with the appropriate status/request line.
stringvalid() : bool
boollazyLoadHeader($index) : mixed
mixednormalizeFieldName(string $fieldName) : string
string
string$encoding : string
$headersKeys : array
EOL : string
FOLDING : string