RequestData
final class RequestData (View source)
Methods
__construct(ServerRequestInterface $request, HttpRequestInspector $inspector = new HttpRequestInspector())
request()
ServerRequestInterface
input(string $key, mixed $default = null)
mixed
query(string $key, mixed $default = null)
mixed
queryAll()
array
post(string $key, mixed $default = null)
mixed
postAll()
array
header(string $name, string|null $default = null)
string|null
headers()
array
cookie(string $name, mixed $default = null)
mixed
cookies()
array
server(string $key, mixed $default = null)
mixed
array
body()
string
jsonInput(string $key, mixed $default = null)
mixed
array
bool
bool
bool
file(string $name)
UploadedFileInterface|array|null
files()
array
bool
ip()
string|null
userAgent(string|null $default = null)
string|null
referer(string|null $default = null)
string|null
method()
string
isMethod(HttpMethod|string $method)
bool
isGet()
bool
isPost()
bool
isPut()
bool
isPatch()
bool
isDelete()
bool
isHead()
bool
bool
inputString(string $key, string $default = '')
string
inputInt(string $key, int $default = 0)
int
inputFloat(string $key, float $default = 0.0)
float
inputBool(string $key, bool $default = false)
bool
Details
__construct
__construct(ServerRequestInterface $request, HttpRequestInspector $inspector = new HttpRequestInspector())
No description
request
ServerRequestInterface
request()
No description
input
mixed
input(string $key, mixed $default = null)
No description
query
mixed
query(string $key, mixed $default = null)
No description
queryAll
array
queryAll()
No description
post
mixed
post(string $key, mixed $default = null)
No description
postAll
array
postAll()
No description
header
string|null
header(string $name, string|null $default = null)
No description
headers
array
headers()
No description
cookie
mixed
cookie(string $name, mixed $default = null)
No description
cookies
array
cookies()
No description
server
mixed
server(string $key, mixed $default = null)
No description
serverAll
array
serverAll()
No description
body
string
body()
No description
jsonInput
mixed
jsonInput(string $key, mixed $default = null)
No description
jsonPayload
array
jsonPayload()
No description
isJsonRequest
bool
isJsonRequest()
No description
acceptsJson
bool
acceptsJson()
No description
expectsJson
bool
expectsJson()
No description
file
UploadedFileInterface|array|null
file(string $name)
No description
files
array
files()
No description
isAjaxRequest
bool
isAjaxRequest()
No description
ip
string|null
ip()
No description
userAgent
string|null
userAgent(string|null $default = null)
No description
referer
string|null
referer(string|null $default = null)
No description
method
string
method()
No description
isMethod
bool
isMethod(HttpMethod|string $method)
No description
isGet
bool
isGet()
No description
isPost
bool
isPost()
No description
isPut
bool
isPut()
No description
isPatch
bool
isPatch()
No description
isDelete
bool
isDelete()
No description
isHead
bool
isHead()
No description
isOptions
bool
isOptions()
No description
inputString
string
inputString(string $key, string $default = '')
No description
inputInt
int
inputInt(string $key, int $default = 0)
No description
inputFloat
float
inputFloat(string $key, float $default = 0.0)
No description
inputBool
bool
inputBool(string $key, bool $default = false)
No description