params = $params; } public function getParams(): array { return $this->params; } public function hasParam(string $directive): bool { return in_array($directive, $this->params); } public static function parse(HttpHeader $header): ConnectionHeader { return new ConnectionHeader( array_unique( array_map( fn($directive) => trim($directive), explode(',', strtolower($header->getFirstLine())) ) ) ); } }