ServerRequestInstruction
class \
- Implements
- JsonSerializable
Reduced representation of `ServerRequest` information, which is used to replay the intercepted request later, once access was granted.
Internal
Table of Contents
Interfaces
- JsonSerializable
Constants
- KEEP_ATTRIBUTE_NAMES : mixed = ['applicationType']
- Attribute names that shall be taken from the original request
Properties
- $attributes : array
- $body : StreamInterface
- $headers : array
- $method : string
- $parsedBody : array|null
- $queryParams : array
- $requestTarget : string
- $serverParams : array
- $uri : UriInterface
Methods
- applyTo() : ServerRequestInterface
- Applies instructions to given ServerRequest ("replaying the request").
- buildFromArray() : self
- createForServerRequest() : self
- getAttributes() : array
- getBody() : StreamInterface
- getHeaders() : array
- getMethod() : string
- getParsedBody() : array|null
- getQueryParams() : array
- getRequestTarget() : string
- getServerParams() : array
- getUri() : UriInterface
- jsonSerialize() : array
- __clone() : mixed
- __construct() : mixed
- clone() : mixed
Constants
KEEP_ATTRIBUTE_NAMES
Attribute names that shall be taken from the original request
protected
mixed
KEEP_ATTRIBUTE_NAMES
= ['applicationType']
Properties
$attributes
protected
array
$attributes
$body
protected
StreamInterface
$body
$headers
protected
array
$headers
$method
protected
string
$method
$parsedBody
protected
array|null
$parsedBody
$queryParams
protected
array
$queryParams
$requestTarget
protected
string
$requestTarget
$serverParams
protected
array
$serverParams
$uri
protected
UriInterface
$uri
Methods
applyTo()
Applies instructions to given ServerRequest ("replaying the request").
public
applyTo(ServerRequestInterface $request) : ServerRequestInterface
Parameters
- $request : ServerRequestInterface
Return values
ServerRequestInterfacebuildFromArray()
public
static buildFromArray(array $data) : self
Parameters
- $data : array
Return values
selfcreateForServerRequest()
public
static createForServerRequest(ServerRequestInterface $request) : self
Parameters
- $request : ServerRequestInterface
Return values
selfgetAttributes()
public
getAttributes() : array
Return values
arraygetBody()
public
getBody() : StreamInterface
Return values
StreamInterfacegetHeaders()
public
getHeaders() : array
Return values
arraygetMethod()
public
getMethod() : string
Return values
stringgetParsedBody()
public
getParsedBody() : array|null
Return values
array|nullgetQueryParams()
public
getQueryParams() : array
Return values
arraygetRequestTarget()
public
getRequestTarget() : string
Return values
stringgetServerParams()
public
getServerParams() : array
Return values
arraygetUri()
public
getUri() : UriInterface
Return values
UriInterfacejsonSerialize()
public
jsonSerialize() : array
Return values
array__clone()
protected
__clone() : mixed
__construct()
protected
__construct() : mixed
clone()
protected
static clone(mixed $value) : mixed
Parameters
- $value : mixed