langs = $langs; } public function getLanguages(): array { return $this->langs; } public function hasLanguage(string $lang): bool { return in_array(strtolower($lang), $this->langs); } public static function parse(HttpHeader $header): ContentLanguageHeader { return new ContentLanguageHeader( array_unique( array_map( fn($directive) => trim($directive), explode(',', strtolower($header->getFirstLine())) ) ) ); } }