QueryArgs final class
Minn\Runtime\QueryArgs · public/minn/src/Minn/Runtime/QueryArgs.php · 78 lines
Query arguments added to and taken from an address the way WordPress's add_query_arg() and remove_query_arg() do, the current request's address when none is given, and an action's nonce added to one.
Public
| static | add(mixed ...$args): string# | An address with arguments added (add_query_arg): a key and value, or a list of them, then the address (the request's when false or left out). Values are URL-encoded; an empty one leaves its key bare, a false or null one takes the key out. |
| static | versioned(string $src, string $version): string# | A script's or style's address with its version, as the dependency printers add it: the same address add_query_arg would give, its query read without wp_parse_str's filter (probe: printing a versioned script fires none on the reference). |
| static | remove(mixed $key, mixed $query = false): mixed# | An address with an argument, or each of a list, taken out (remove_query_arg); an empty list gives back what was given. |
| static | withNonce(mixed $actionUrl, mixed $action = -1, mixed $name = '_wpnonce'): string# | An address carrying a nonce for the action (wp_nonce_url), escaped for HTML. |
| static | requestUri(): string# | The request's address as PHP was given it; a runtime built without one gives its request's path and query. |
Internals 1
Private and protected methods: how the class does its work. Not a contract; they change whenever the code is tidied.
| private | with(string $uri, array $new, Closure $read): string# | An address with the arguments set, its own query read through the given step and encoded.
|
Nothing matches.