headers = $headers; } public function getHeaders(): array { return $this->headers; } public function isAllowed(string $header): bool { return in_array(strtolower($header), $this->headers); } public static function parse(HttpHeader $header): AccessControlRequestHeadersHeader { $raw = explode(',', $header->getFirstLine()); $headers = []; foreach($raw as $header) $headers[] = strtolower(trim($header)); return new AccessControlRequestHeadersHeader(array_unique($headers)); } }