Input
in package
Typed access to request input. Superglobals carry no type guarantees (a crafted request can turn any field into an array), so every read narrows to a string here and the rest of the code never touches them raw.
Table of Contents
Methods
- has() : bool
- Whether a query-string field is present at all (e.g. a bare `?add`).
- post() : string
- A POST field as a string ('' when absent or not a string).
- query() : string
- A query-string field as a string ('' when absent or not a string).
Methods
has()
Whether a query-string field is present at all (e.g. a bare `?add`).
public
static has(string $key) : bool
Parameters
- $key : string
-
The field name.
Return values
boolpost()
A POST field as a string ('' when absent or not a string).
public
static post(string $key) : string
Parameters
- $key : string
-
The field name.
Return values
stringquery()
A query-string field as a string ('' when absent or not a string).
public
static query(string $key) : string
Parameters
- $key : string
-
The field name.