On this page
Requests_Response_Headers::offsetSet( string $key, string $value )
Set the given item
Parameters
$keystring Required-
Item name
$valuestring Required-
Item value
Source
File: wp-includes/Requests/Response/Headers.php. View all references
public function offsetSet($key, $value) {
if ($key === null) {
throw new Requests_Exception('Object is a dictionary, not a list', 'invalidset');
}
$key = strtolower($key);
if (!isset($this->data[$key])) {
$this->data[$key] = array();
}
$this->data[$key][] = $value;
}
Related
Uses
| Uses | Description |
|---|---|
| Requests_Exception::__construct() wp-includes/Requests/Exception.php | Create a new exception |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/requests_response_headers/offsetset