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
string
optional
\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
int
count of currently known headerscurrent() : array | \Zend\Http\Header\HeaderInterface
forceLoading() : bool
bool
fromString(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
bool
key() : mixed
mixed
next() : 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 |
---|
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
createKey(string $name) : string
string
string
lazyLoadHeader($index) : mixed | void
mixed
void
$headers : array
$headersKeys : array