addHeader()
addHeaderLine()
addHeaders()
clearHeaders()
count()
current()
forceLoading()
fromString()
get()
getPluginClassLoader()
has()
key()
next()
removeHeader()
rewind()
setPluginClassLoader()
toArray()
toString()
valid()
createKey()
lazyLoadHeader()
$headers
$headersKeys
$pluginClassLoader
Basic HTTP headers collection functionality Handles aggregation of headers
| see | \Zend\Http\http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2 |
|---|
addHeader(\Zend\Http\Header\HeaderInterface $header) : \Zend\Http\Headers
addHeaderLine(string $headerFieldNameOrLine, string $fieldValue) : \Zend\Http\Headers
This method allows for lazy-loading in that the parsing and instantiation of Header object will be delayed until they are retrieved by either get() or current()
string
stringoptional
\Zend\Http\Exception\InvalidArgumentException |
|---|
addHeaders(array | \Traversable $headers) : \Zend\Http\Headers
Expects an array (or Traversable object) of type/value pairs.
array\Traversable
\Zend\Http\Exception\InvalidArgumentException |
|---|
count() : int
If you need an exact count, iterate
intcount of currently known headerscurrent() : array | \Zend\Http\Header\HeaderInterface
forceLoading() : bool
boolfromString(string $string) : \Zend\Http\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
\Zend\Http\Exception\RuntimeException |
|---|
get(string $name) : bool | \Zend\Http\Header\HeaderInterface | \ArrayIterator
getPluginClassLoader() : \Zend\Loader\PluginClassLocator
has(string $name) : bool
string
boolkey() : mixed
mixednext() : void
removeHeader(\Zend\Http\Header\HeaderInterface $header) : bool
rewind() : void
setPluginClassLoader(\Zend\Loader\PluginClassLocator $pluginClassLoader) : \Zend\Http\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
boolcreateKey(string $name) : string
string
stringlazyLoadHeader($index) : mixed | void
mixedvoid
$headers : array
$headersKeys : array