Request
Implements
Uses
Properties
$request Psr\...\RequestInterface
The underlying PSR request.
$data array
The decoded payload for the request.
Methods
__construct ( $request ) : void
Create a new request instance.
Parameters
- $request Psr\...\RequestInterface
method ( ) : string
Get the request method.
url ( ) : string
Get the URL of the request.
hasHeader ( $key , $value ) : bool
Determine if the request has a given header.
Parameters
- $key string
- $value mixed
hasHeaders ( $headers ) : bool
Determine if the request has the given headers.
Parameters
- $headers array|string
header ( $key ) : array
Get the values for the header with the given name.
Parameters
- $key string
headers ( ) : array
Get the request headers.
body ( ) : string
Get the body of the request.
hasFile ( $name , $value , $filename ) : bool
Determine if the request contains the given file.
Parameters
- $name string
- $value string|null
- $filename string|null
data ( ) : array
Get the request's data (form parameters or JSON).
parameters ( ) : array
Get the request's form parameters.
json ( ) : array
Get the JSON decoded body of the request.
isForm ( ) : bool
Determine if the request is simple form data.
isJson ( ) : bool
Determine if the request is JSON.
isMultipart ( ) : bool
Determine if the request is multipart.
withData ( array $data ) : $this
Set the decoded data on the request.
Parameters
- $data array
toPsrRequest ( ) : Psr\...\RequestInterface
Get the underlying PSR compliant request instance.
offsetExists ( $offset ) : bool
Determine if the given offset exists.
Parameters
- $offset string
offsetGet ( $offset ) : mixed
Get the value for a given offset.
Parameters
- $offset string
offsetSet ( $offset , $value ) : void
Set the value at the given offset.
Parameters
- $offset string
- $value mixed
offsetUnset ( $offset ) : void
Unset the value at the given offset.
Parameters
- $offset string