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
string
optional
\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
int
count of currently known headerscurrent() : \Zend\Mail\Header\HeaderInterface
forceLoading() : bool
bool
fromString(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
string
EOL string; defaults to {@link EOL}
\Zend\Mail\Exception\RuntimeException |
---|
get(string $name) : bool | \ArrayIterator | \Zend\Mail\Header\HeaderInterface
string
bool
\ArrayIterator
\Zend\Mail\Header\HeaderInterface
Returns 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
string
getPluginClassLoader() : \Zend\Loader\PluginClassLocator
has(string $name) : bool
string
bool
key() : mixed
mixed
next()
removeHeader(string | \Zend\Mail\Header\HeaderInterface $instanceOrFieldName) : bool
string\Zend\Mail\Header\HeaderInterface
field name or specific header instance to remove
bool
rewind()
setPluginClassLoader(\Zend\Loader\PluginClassLocator $pluginClassLoader) : \Zend\Mail\Headers
toArray() : array
todo | determine how to produce single line headers, if they are supported |
---|
array
toString() : string
This method handles the normal iteration of headers; it is up to the concrete classes to prepend with the appropriate status/request line.
string
valid() : bool
bool
lazyLoadHeader($index) : mixed
mixed
normalizeFieldName(string $fieldName) : string
string
string
$encoding : string
$headersKeys : array
EOL : string
FOLDING : string