Requests_Response_Headers::offsetGet()publicWP 1.0

Get the given header

Unlike {@see self::getValues()}, this returns a string. If there are multiple values, it concatenates them with a comma as per RFC2616.

Avoid using this where commas may be used unquoted in values, such as Set-Cookie headers.

Метод класса: Requests_Response_Headers{}

Хуков нет.

Возвращает

Строку|null. Header value

Использование

$Requests_Response_Headers = new Requests_Response_Headers();
$Requests_Response_Headers->offsetGet( $key );
$key(строка) (обязательный)
-

Код Requests_Response_Headers::offsetGet() WP 6.1.1

public function offsetGet($key) {
	$key = strtolower($key);
	if (!isset($this->data[$key])) {
		return null;
	}

	return $this->flatten($this->data[$key]);
}