ServerRequestInstruction implements JsonSerializable
Reduced representation of `ServerRequest` information, which is used to replay the intercepted request later, once access was granted.
Table of Contents
Interfaces
- JsonSerializable
Constants
- KEEP_ATTRIBUTE_NAMES = ['applicationType']
- Attribute names that shall be taken from the original request
Properties
- $attributes : array<string|int, mixed>
- $body : StreamInterface
- $method : string
- $parsedBody : array<string|int, mixed>|null
- $queryParams : array<string|int, mixed>
- $requestTarget : string
- $uri : UriInterface
Methods
- applyTo() : ServerRequestInterface
- Applies instructions to given ServerRequest ("replaying the request").
- buildFromArray() : self
- createForServerRequest() : self
- getAttributes() : array<string|int, mixed>
- getBody() : StreamInterface
- getMethod() : string
- getParsedBody() : array<string|int, mixed>|null
- getQueryParams() : array<string|int, mixed>
- getRequestTarget() : string
- getUri() : UriInterface
- jsonSerialize() : array<string|int, mixed>
- __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<string|int, mixed>
$attributes
$body
protected
StreamInterface
$body
$method
protected
string
$method
$parsedBody
protected
array<string|int, mixed>|null
$parsedBody
$queryParams
protected
array<string|int, mixed>
$queryParams
$requestTarget
protected
string
$requestTarget
$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<string|int, mixed> $data) : self
Parameters
- $data : array<string|int, mixed>
Return values
selfcreateForServerRequest()
public
static createForServerRequest(ServerRequestInterface $request) : self
Parameters
- $request : ServerRequestInterface
Return values
selfgetAttributes()
public
getAttributes() : array<string|int, mixed>
Return values
array<string|int, mixed>getBody()
public
getBody() : StreamInterface
Return values
StreamInterfacegetMethod()
public
getMethod() : string
Return values
stringgetParsedBody()
public
getParsedBody() : array<string|int, mixed>|null
Return values
array<string|int, mixed>|nullgetQueryParams()
public
getQueryParams() : array<string|int, mixed>
Return values
array<string|int, mixed>getRequestTarget()
public
getRequestTarget() : string
Return values
stringgetUri()
public
getUri() : UriInterface
Return values
UriInterfacejsonSerialize()
public
jsonSerialize() : array<string|int, mixed>
Return values
array<string|int, mixed>__clone()
protected
__clone() : mixed
__construct()
protected
__construct() : mixed
clone()
protected
static clone(mixed $value) : mixed
Parameters
- $value : mixed