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