mirror of
https://github.com/getformwork/formwork.git
synced 2025-03-14 19:19:48 +01:00
Add Header::responseHeaders()
method
This commit is contained in:
parent
26e070b661
commit
2752097f95
@ -80,6 +80,16 @@ class Header
|
||||
header($fieldName . ': ' . trim($fieldValue));
|
||||
}
|
||||
|
||||
public static function responseHeaders()
|
||||
{
|
||||
$headers = array();
|
||||
foreach (headers_list() as $header) {
|
||||
list($key, $value) = explode(':', $header, 2);
|
||||
$headers[$key] = trim($value);
|
||||
}
|
||||
return $headers;
|
||||
}
|
||||
|
||||
public static function contentType($mimeType)
|
||||
{
|
||||
static::send('Content-Type', $mimeType);
|
||||
|
Loading…
x
Reference in New Issue
Block a user