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