API / Minn\Front / RequestParse

RequestParse final class

Minn\Front\RequestParse · public/minn/src/Minn/Front/RequestParse.php · 68 lines

The query vars the reference's request parse sets for an address (WP::parse_request), which plugins read off $wp->query_vars and get_query_var: each public var the query string or form carries, else the one the matched rewrite rule set (Front\RuleTable), all in the public vars' order (a plugin's own after the core ones); a post type's own var brings post_type and name; a path no rule matches is error=404 (the query string's error is ignored).

Public

staticvars(array $rule, array $publicVars, array $given): array#

The parse's vars, in the reference's order.

$rulearray<string, string>the matched rule's vars
$publicVarslist<string>the public query vars, after the query_vars filter
$givenarray<string, mixed>the query string's and the form's values
@return array<string, string|array<mixed>>
staticmismatch(array $publicVars, array $query, array $form): bool#

Whether the query string and the form give a public var two different values: the reference refuses such a request (A variable mismatch has been detected, a 400) before it reads either.

$publicVarslist<string>
$queryarray<string, mixed>
$formarray<string, mixed>
staticqueryString(array $vars): string#

The reference's query string for parse vars (WP::build_query_string): each one with a value, encoded.