WordPress\AiClient\Providers\Http\Collections
HeadersCollection::get
Gets a specific header value.
Method of the class: HeadersCollection{}
No Hooks.
Returns
list
Usage
$HeadersCollection = new HeadersCollection(); $HeadersCollection->get( $name ): ?array;
- $name(string) (required)
- The header name (case-insensitive).
Changelog
| Since 0.1.0 | Introduced. |
HeadersCollection::get() HeadersCollection::get code WP 7.0
public function get(string $name): ?array
{
$lowerName = strtolower($name);
if (!isset($this->headersMap[$lowerName])) {
return null;
}
$actualName = $this->headersMap[$lowerName];
return $this->headers[$actualName];
}