ArrayCarrier implements Carrier
FinalYes
Key lookups are case-insensitive (HTTP headers).
Tags
Interfaces
Methods
- __construct() : mixed
- get() : null|string
- Get a value by key.
- set() : static
- Set a value.
- unwrap() : array<string, string>
- Unwrap and return the underlying data structure.
Methods
__construct()
public
__construct([array<string, string> $data = [] ]) : mixed
Parameters
- $data : array<string, string> = []
-
The carrier data
get()
Get a value by key.
public
get(string $key) : null|string
Key lookup should be case-insensitive for HTTP header compatibility.
Parameters
- $key : string
-
The key to look up
Return values
null|string —The value, or null if not found
set()
Set a value.
public
set(string $key, string $value) : static
Parameters
- $key : string
-
The key to set
- $value : string
-
The value to set
Return values
static —For fluent chaining
unwrap()
Unwrap and return the underlying data structure.
public
unwrap() : array<string, string>