Headers::offsetSet( string $offset, string $value )
Set the given item
Parameters
- $offset
-
(Required) Item name
- $value
-
(Required) Item value
Source
File: wp-includes/Requests/src/Response/Headers.php
public function offsetSet($offset, $value) {
if ($offset === null) {
throw new Exception('Object is a dictionary, not a list', 'invalidset');
}
if (is_string($offset)) {
$offset = strtolower($offset);
}
if (!isset($this->data[$offset])) {
$this->data[$offset] = [];
}
$this->data[$offset][] = $value;
}