Class Negotiate
Provides methods to negotiate with the HTTP headers to determine the best type match between what the application supports and what the requesting server wants.
Methods | ||
---|---|---|
public
|
__construct(?RequestInterface $request = null)
|
# |
public
|
setRequest(RequestInterface $request): $this
|
# |
public
|
media(array $supported, bool $strictMatch = false): string
|
# |
public
|
charset(array $supported): string
|
# |
public
|
encoding(array $supported = []): string
|
# |
public
|
language(array $supported): string
|
# |
protected
|
getBestMatch(
array $supported,
string $header = null,
bool $enforceTypes = false,
bool $strictMatch = false,
bool $matchLocales = false,
): string
|
# |
public
|
parseHeader(string $header): array
|
# |
protected
|
match(array $acceptable, string $supported, bool $enforceTypes = false, bool $matchLocales = false): bool
|
# |
protected
|
matchParameters(array $acceptable, array $supported): bool
|
# |
public
|
matchTypes(array $acceptable, array $supported): bool
|
# |
public
|
matchLocales(array $acceptable, array $supported): bool
|
# |
Properties | |||
---|---|---|---|
protected
|
IncomingRequest
|
$request
|
# |