typo, parameter and type fixes
[mdref/mdref-http] / http / Env / negotiate.md
1 # static string http\Env::negotiate(string $params, array $supported[, string $prim_typ_sep[, array &$result]])
2
3 Generic negotiator. For specific client negotiation see http\Env::negotiateContentType() and related methods.
4
5 > ***NOTE:***
6 > The first element of $supported serves as a default if no operand matches.
7
8 ## Params:
9
10 * string $params
11 HTTP header parameter's value to negotiate.
12 * array $supported
13 List of supported negotiation operands.
14 * Optional string $prim_typ_sep
15 A "primary type separator", i.e. that would be a hyphen for content language negotiation (en-US, de-DE, etc.).
16 * Optional array &$result
17 Out parameter recording negotiation results.
18
19 ## Returns:
20
21 * NULL, if negotiation fails.
22 * string, the closest match negotiated, or the default (first entry of $supported).