| 1 bootstrap.inc | backdrop_get_http_header($name = NULL) |
Gets the HTTP response headers for the current page.
Parameters
string|null $name: An HTTP header name. If omitted, all headers are returned as name/value pairs. If an array value is FALSE, the header has been unset.
Return value
array|string|false|null: A string containing the header value. If name is omitted, all headers are returned as name/value pairs. NULL if the header name has not been set, or FALSE if the header has been set.
File
- core/
includes/ bootstrap.inc, line 1657 - Functions that need to be loaded on every Backdrop request.
Code
function backdrop_get_http_header($name = NULL) {
$headers = &backdrop_static('backdrop_http_headers', array());
if (isset($name)) {
$name = strtolower($name);
return isset($headers[$name]) ? $headers[$name] : NULL;
}
else {
return $headers;
}
}