ServerRequest
class ServerRequest extends ServerRequest
Properties
| static ServerRequest|null | $instance |
Methods
Get the singleton instance of the ServerRequest.
Retrieve all query and body parameters.
Retrieve a specific input value.
Check if a specific key is filled.
Add a parameter to the query string.
Add a parameter to the request body.
Add a parameter to the request, either to the query string or body based on the HTTP method.
Add a file to the uploaded files.
Check if the current request is an AJAX request.
Details
at line 16
static ServerRequest
get()
Get the singleton instance of the ServerRequest.
at line 28
array
all()
Retrieve all query and body parameters.
at line 39
mixed
input(string $key, mixed $default = null)
Retrieve a specific input value.
at line 49
bool
filled(string $key)
Check if a specific key is filled.
at line 60
ServerRequest
addGet(string $name, mixed $value)
Add a parameter to the query string.
at line 76
ServerRequest
addToBody(string $name, mixed $value)
Add a parameter to the request body.
at line 92
ServerRequest
add(string $name, mixed $value)
Add a parameter to the request, either to the query string or body based on the HTTP method.
at line 107
ServerRequest
addFile(string $path, string $name, string $mime_type)
Add a file to the uploaded files.
at line 127
bool
isAjax()
Check if the current request is an AJAX request.