Requests_Response_Headers::offsetGet()
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.
{} It's a method of the class: Requests_Response_Headers{}
No Hooks.
Return
String|null
. Header value
Usage
$Requests_Response_Headers = new Requests_Response_Headers(); $Requests_Response_Headers->offsetGet( $key );
- $key(string) (required)
- -
Code of Requests_Response_Headers::offsetGet() Requests Response Headers::offsetGet WP 6.0
public function offsetGet($key) { $key = strtolower($key); if (!isset($this->data[$key])) { return null; } return $this->flatten($this->data[$key]); }