WordPress at Your Fingertips
function is not described

Requests_Response_Headers::offsetSet() public WP 1.0

Set the given item

{} It's a method of the class: Requests_Response_Headers{}

No Hooks.


null. Nothing.


$Requests_Response_Headers = new Requests_Response_Headers();
$Requests_Response_Headers->offsetSet( $key, $value );
$key(string) (required)
Item name
$value(string) (required)
Item value

Code of Requests_Response_Headers::offsetSet() WP 5.8

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;