HeaderCollection
in package
implements
IteratorAggregate, Countable, ArrayAccess, ToArrayInterface
Provides a case-insensitive collection of headers
Interfaces, Classes and Traits
- IteratorAggregate
- Countable
- ArrayAccess
- ToArrayInterface
- An object that can be represented as an array
Table of Contents
- $headers : array<string|int, mixed>
- __clone() : mixed
- __construct() : mixed
- add() : self
- Set a header on the collection
- clear() : mixed
- Clears the header collection
- count() : mixed
- get() : mixed
- Alias of offsetGet
- getAll() : array<string|int, mixed>
- Get an array of header objects
- getIterator() : mixed
- offsetExists() : mixed
- offsetGet() : mixed
- offsetSet() : mixed
- offsetUnset() : mixed
- toArray() : array<string|int, mixed>
- Get the array representation of an object
Properties
$headers
protected
array<string|int, mixed>
$headers
Methods
__clone()
public
__clone() : mixed
Return values
mixed —__construct()
public
__construct([mixed $headers = array() ]) : mixed
Parameters
- $headers : mixed = array()
Return values
mixed —add()
Set a header on the collection
public
add(HeaderInterface $header) : self
Parameters
- $header : HeaderInterface
-
Header to add
Return values
self —clear()
Clears the header collection
public
clear() : mixed
Return values
mixed —count()
public
count() : mixed
Return values
mixed —get()
Alias of offsetGet
public
get(mixed $key) : mixed
Parameters
- $key : mixed
Return values
mixed —getAll()
Get an array of header objects
public
getAll() : array<string|int, mixed>
Return values
array<string|int, mixed> —getIterator()
public
getIterator() : mixed
Return values
mixed —offsetExists()
public
offsetExists(mixed $offset) : mixed
Parameters
- $offset : mixed
Return values
mixed —offsetGet()
public
offsetGet(mixed $offset) : mixed
Parameters
- $offset : mixed
Return values
mixed —offsetSet()
public
offsetSet(mixed $offset, mixed $value) : mixed
Parameters
- $offset : mixed
- $value : mixed
Return values
mixed —offsetUnset()
public
offsetUnset(mixed $offset) : mixed
Parameters
- $offset : mixed
Return values
mixed —toArray()
Get the array representation of an object
public
toArray() : array<string|int, mixed>