| Methods | 
	
			| 
					
	public
					
					
				 | __construct($items = []) | # | 
	
			| 
					
	public
					static
					
				 | from(
	Arrayable<string, string[]|string>|iterable<string, string[]|string>|MessageInterface|string $headersOrPayload,
): static
	 | # | 
	
			| 
					
	public
					
					
				 | addLine(string $line, bool $strict = false)
		Parse and apply a header field line or continuation thereof
	 
	Parse and apply a header field line or continuation thereof To initialise an instance from an HTTP stream or message, call this
method once per field line after the request or status line, including
the CRLF sequence at the end of each line. After receiving an empty line
("\r\n"), {@see hasEmptyLine()} returnstrue, and any headers
received via {@see addLine()} are applied as trailers.Parameters
									
										| $strict | If true, strict [RFC9112] compliance is enforced. |  Implements | # | 
	
			| 
					
	public
					
					
				 | hasEmptyLine(): bool
		Check if an empty line has been received via addLine()
	 
	Check if an empty line has been received via addLine()Implements | # | 
	
			| 
					
	public
					
					
				 | hasBadWhitespace(): bool
		Check if a line with bad whitespace has been received via addLine()
	 
	Check if a line with bad whitespace has been received via addLine()Implements | # | 
	
			| 
					
	public
					
					
				 | hasObsoleteLineFolding(): bool
		Check if obsolete line folding has been received via addLine()
	 
	Check if obsolete line folding has been received via addLine()Implements | # | 
	
			| 
					
	public
					
					
				 | addValue($key, $value)
		Apply a value to a header, preserving any existing values
	 
	Apply a value to a header, preserving any existing valuesImplements | # | 
	
			| 
					
	public
					
					
				 | set($key, $value)
		Add or replace an item with a given key
	 
	Add or replace an item with a given keyImplements | # | 
	
			| 
					
	public
					
					
				 | unset($key)
		Remove an item with a given key
	 
	Remove an item with a given keyImplements | # | 
	
			| 
					
	public
					
					
				 | merge($items, bool $preserveValues = false)
		Merge the collection with the given items
	 
	Merge the collection with the given itemsImplements | # | 
	
			| 
					
	public
					
					
				 | sort()
		Sort items in the collection
	 
	Sort items in the collectionImplements | # | 
	
			| 
					
	public
					
					
				 | reverse()
		Reverse the order of items in the collection
	 
	Reverse the order of items in the collectionImplements | # | 
	
			| 
					
	public
					
					
				 | map(callable $callback, int $mode = CollectionInterface::CALLBACK_USE_VALUE)
		Pass each item in the collection to a callback and populate a new
collection with its return values
	 
	Pass each item in the collection to a callback and populate a new
collection with its return valuesImplements | # | 
	
			| 
					
	public
					
					
				 | filter(callable $callback, int $mode = CollectionInterface::CALLBACK_USE_VALUE)
		Reduce the collection to items that satisfy a callback
	 
	Reduce the collection to items that satisfy a callbackImplements | # | 
	
			| 
					
	public
					
					
				 | only(array $keys)
		Reduce the collection to items with keys in an array
	 
	Reduce the collection to items with keys in an arrayImplements | # | 
	
			| 
					
	public
					
					
				 | onlyIn(array $index)
		Reduce the collection to items with keys in an index
	 
	Reduce the collection to items with keys in an indexImplements | # | 
	
			| 
					
	public
					
					
				 | except(array $keys)
		Reduce the collection to items with keys not in an array
	 
	Reduce the collection to items with keys not in an arrayImplements | # | 
	
			| 
					
	public
					
					
				 | exceptIn(array $index)
		Reduce the collection to items with keys not in an index
	 
	Reduce the collection to items with keys not in an indexImplements | # | 
	
			| 
					
	public
					
					
				 | slice(int $offset, ?int $length = null)
		Extract a slice of the collection
	 
	Extract a slice of the collectionImplements | # | 
	
			| 
					
	public
					
					
				 | pop(&$last = null)
		Pop an item off the end of the collection
	 
	Pop an item off the end of the collectionParameters
									
										| $last | Receives the value removed from the collection,
or nullif the collection is empty. |  Implements | # | 
	
			| 
					
	public
					
					
				 | shift(&$first = null)
		Shift an item off the beginning of the collection
	 
	Shift an item off the beginning of the collectionParameters
									
										| $first | Receives the value removed from the collection,
or nullif the collection is empty. |  Implements | # | 
	
			| 
					
	public
					
					
				 | authorize(CredentialInterface $credential, string $headerName = Headers::HEADER_AUTHORIZATION)
		Apply a credential to a header
	 
	Apply a credential to a headerImplements | # | 
	
			| 
					
	public
					
					
				 | normalise()
		Move the "Host" header to the start of the collection if present
	 
	Move the "Host" header to the start of the collection if presentImplements | # | 
	
			| 
					
	public
					
					
				 | trailers()
		Reduce the collection to headers received after the message body
	 
	Reduce the collection to headers received after the message bodyImplements | # | 
	
			| 
					
	public
					
					
				 | withoutTrailers()
		Reduce the collection to headers received before the message body
	 
	Reduce the collection to headers received before the message bodyImplements | # | 
	
			| 
					
	public
					
					
				 | getLines(string $format = '%s: %s', ?string $emptyFormat = null): array
		Get header names and values in their original order as a list of field
lines, preserving the original case of each…
	 
	Get header names and values in their original order as a list of field
lines, preserving the original case of each header If $emptyFormatis given, it is used for headers with an empty value.Implements | # | 
	
			| 
					
	public
					
					
				 | getHeaders(): array
		Get an array that maps header names to values, preserving the original
case of the first appearance of each header
	 
	Get an array that maps header names to values, preserving the original
case of the first appearance of each headerImplements | # | 
	
			| 
					
	public
					
					
				 | hasHeader(string $name): bool
		Check if a header exists
	 | # | 
	
			| 
					
	public
					
					
				 | getHeader(string $name): array
		Get the value of a header as a list of values
	 
	Get the value of a header as a list of valuesImplements | # | 
	
			| 
					
	public
					
					
				 | getHeaderLine(string $name): string
		Get the value of a header as a string of comma-delimited values
	 
	Get the value of a header as a string of comma-delimited valuesImplements | # | 
	
			| 
					
	public
					
					
				 | getHeaderLines(): array
		Get an array that maps lowercase header names to comma-separated values
	 
	Get an array that maps lowercase header names to comma-separated valuesImplements | # | 
	
			| 
					
	public
					
					
				 | getHeaderValues(string $name): array
		Get the value of a header as a list of values, splitting any
comma-separated values
	 
	Get the value of a header as a list of values, splitting any
comma-separated valuesImplements | # | 
	
			| 
					
	public
					
					
				 | getFirstHeaderValue(string $name): string
		Get the first value of a header after splitting any comma-separated
values
	 
	Get the first value of a header after splitting any comma-separated
valuesImplements | # | 
	
			| 
					
	public
					
					
				 | getLastHeaderValue(string $name): string
		Get the last value of a header after splitting any comma-separated values
	 
	Get the last value of a header after splitting any comma-separated valuesImplements | # | 
	
			| 
					
	public
					
					
				 | getOnlyHeaderValue(string $name, bool $orSame = false): string
		Get the only value of a header after splitting any comma-separated values
	 
	Get the only value of a header after splitting any comma-separated valuesImplements | # | 
	
			| 
					
	public
					
					
				 | __toString(): string | # | 
	
			| 
					
	public
					
					
				 | jsonSerialize(): array | # | 
	
			| 
					
	protected
					
					
				 | getItemsArray(
	Arrayable<string, string[]|string>|iterable<string, string[]|string> $items,
	array<int, array{string, string}>|null &$headers = null,
	array<string, int[]>|null &$index = null,
): array<string, string[]>
	 | # | 
	
			| 
					
	protected
					
					
				 | getItems(
	Arrayable<string, string[]|string>|iterable<string, string[]|string> $items,
): iterable<string, non-empty-array<string>>
	 | # | 
	
			| 
					
	protected
					
					
				 | compareItems(string[] $a, string[] $b): int
	 | # | 
	
			| 
					
	protected
					
					
				 | generateHeaders(): iterable<string, string>
	 | # |