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 59
mixed
input(string $key, mixed $default = null)
Retrieve a specific input value.
at line 69
bool
filled(string $key)
Check if a specific key is filled.
at line 80
ServerRequest
addGet(string $name, mixed $value)
Add a parameter to the query string.
at line 96
ServerRequest
addToBody(string $name, mixed $value)
Add a parameter to the request body.
at line 112
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 127
ServerRequest
addFile(string $path, string $name, string $mime_type)
Add a file to the uploaded files.
at line 148
bool
isAjax()
Check if the current request is an AJAX request.