Methods |
public
static
|
isRequestMethod(string $method): bool
Check if a string is a valid HTTP request method
Check if a string is a valid HTTP request method
|
#
|
public
static
|
mediaTypeIs(string $type, string $mimeType): bool
Check if a media type is a match for the given MIME type
Check if a media type is a match for the given MIME type
Structured syntax suffixes (e.g. +json in application/vnd.api+json )
are parsed as per [RFC6838] Section 4.2.8 ("Structured Syntax Name
Suffixes").
|
#
|
public
static
|
getDate(?DateTimeInterface $date = null): string
Get an HTTP date value as per [RFC7231] Section 7.1.1.1
Get an HTTP date value as per [RFC7231] Section 7.1.1.1
|
#
|
public
static
|
getParameters(string $value, bool $firstIsParameter = false, bool $unquote = true, bool $strict = false): string[]
Get semicolon-delimited parameters from the value of an HTTP header
Get semicolon-delimited parameters from the value of an HTTP header
|
#
|
public
static
|
mergeParameters(string[] $parameters): string
Merge parameters into a semicolon-delimited HTTP header value
Merge parameters into a semicolon-delimited HTTP header value
|
#
|
public
static
|
getProduct(): string
Get a product identifier suitable for User-Agent and Server headers as
per [RFC7231] Section 5.5.3
Get a product identifier suitable for User-Agent and Server headers as
per [RFC7231] Section 5.5.3
|
#
|
public
static
|
maybeQuoteString(string $string): string
Escape and quote a string unless it is a valid HTTP token, as per
[RFC7230] Section 3.2.6
Escape and quote a string unless it is a valid HTTP token, as per
[RFC7230] Section 3.2.6
|
#
|
public
static
|
escapeQuotedString(string $string): string
Escape backslashes and double-quote marks in a string as per [RFC7230]
Section 3.2.6
Escape backslashes and double-quote marks in a string as per [RFC7230]
Section 3.2.6
|
#
|
public
static
|
unquoteString(string $string): string
Unescape and remove quotes from a string as per [RFC7230] Section 3.2.6
Unescape and remove quotes from a string as per [RFC7230] Section 3.2.6
|
#
|
public
static
|
mergeQuery<T is RequestInterface|UriInterface|Stringable|string>(
T $value,
mixed[] $data,
int-mask-of<FormDataFlag::*> $flags = FormDataFlag::PRESERVE_NUMERIC_KEYS | FormDataFlag::PRESERVE_STRING_KEYS,
?DateFormatterInterface $dateFormatter = null,
): (T is RequestInterface|UriInterface ? T : Uri)
Merge values into the query string of a request or URI
Merge values into the query string of a request or URI
|
#
|
public
static
|
replaceQuery<T is RequestInterface|UriInterface|Stringable|string>(
T $value,
mixed[] $data,
int-mask-of<FormDataFlag::*> $flags = FormDataFlag::PRESERVE_NUMERIC_KEYS | FormDataFlag::PRESERVE_STRING_KEYS,
?DateFormatterInterface $dateFormatter = null,
): (T is RequestInterface|UriInterface ? T : Uri)
Replace the query string of a request or URI with the given values
Replace the query string of a request or URI with the given values
|
#
|
public
static
|
getNameValueGenerator(iterable<array{name: string, value: string}> $items): Generator<string, string>
Get key-value pairs from a list of arrays with "name" and "value" keys
Get key-value pairs from a list of arrays with "name" and "value" keys
|
#
|