1 | <?php |
||
7 | class Headers |
||
8 | { |
||
9 | /* @var array */ |
||
10 | private $headers; |
||
11 | |||
12 | public function __construct(array $headers = []) |
||
16 | |||
17 | /** |
||
18 | * Get headers from $_SERVER global |
||
19 | * @return array |
||
20 | */ |
||
21 | public static function getHeadersArrayFromGlobals(): array |
||
31 | |||
32 | /** |
||
33 | * @param string $serverParameter |
||
34 | * @return bool |
||
35 | */ |
||
36 | private static function isServerKeyAHeader(string $serverParameter): bool |
||
40 | |||
41 | /** |
||
42 | * @param mixed $header |
||
43 | * @return array |
||
44 | */ |
||
45 | private static function wrapValuesInArray($header): array |
||
49 | |||
50 | /** |
||
51 | * @param mixed $headerKey |
||
52 | * @return string |
||
53 | */ |
||
54 | private static function stripKeyOfLeadingHttpPrefix($headerKey): string |
||
58 | } |
||
59 |