web\HeaderCollection offsetUnset()

offsetUnset() public method Removes the named header. This method is required by the SPL interface ArrayAccess. It is implicitly called when you use something like unset($collection[$name]). This is equivalent to remove(). public void offsetUnset ( $name )$name string The header name

web\HeaderCollection offsetSet()

offsetSet() public method Adds the header to the collection. This method is required by the SPL interface ArrayAccess. It is implicitly called when you use something like $collection[$name] = $header;. This is equivalent to add(). public void offsetSet ( $name, $value )$name string The header name $value string The header value to be added

web\HeaderCollection offsetGet()

offsetGet() public method Returns the header with the specified name. This method is required by the SPL interface ArrayAccess. It is implicitly called when you use something like $header = $collection[$name];. This is equivalent to get(). public string offsetGet ( $name )$name string The header name return string The header value with the specified name, null if the named header does not exist.

web\HeaderCollection offsetExists()

offsetExists() public method Returns whether there is a header with the specified name. This method is required by the SPL interface ArrayAccess. It is implicitly called when you use something like isset($collection[$name]). public boolean offsetExists ( $name )$name string The header name return boolean Whether the named header exists

web\HeaderCollection has()

has() public method Returns a value indicating whether the named header exists. public boolean has ( $name )$name string The name of the header return boolean Whether the named header exists

web\HeaderCollection getIterator()

getIterator() public method Returns an iterator for traversing the headers in the collection. This method is required by the SPL interface IteratorAggregate. It will be implicitly called when you use foreach to traverse the collection. public ArrayIterator getIterator ( )return ArrayIterator An iterator for traversing the headers in the collection.

web\HeaderCollection getCount()

getCount() public method Returns the number of headers in the collection. public integer getCount ( )return integer The number of headers in the collection.

web\HeaderCollection get()

get() public method Returns the named header(s). public string|array get ( $name, $default = null, $first = true )$name string The name of the header to return $default mixed The value to return in case the named header does not exist $first boolean Whether to only return the first header of the specified name. If false, all headers of the specified name will be returned. return string|array The named header(s). If $first is true, a string will be returned; If $first is false, an

web\HeaderCollection fromArray()

fromArray() public method (available since version 2.0.3) Populates the header collection from an array. public void fromArray ( array $array )$array array The headers to populate from

web\HeaderCollection count()

count() public method Returns the number of headers in the collection. This method is required by the SPL Countable interface. It will be implicitly called when you use count($collection). public integer count ( )return integer The number of headers in the collection.