ServerRequestInstruction 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  = ['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

$parsedBody

protected array<string|int, mixed>|null $parsedBody

$queryParams

protected array<string|int, mixed> $queryParams

$requestTarget

protected string $requestTarget

Methods

applyTo()

Applies instructions to given ServerRequest ("replaying the request").

public applyTo(ServerRequestInterface $request) : ServerRequestInterface
Parameters
$request : ServerRequestInterface
Return values
ServerRequestInterface

buildFromArray()

public static buildFromArray(array<string|int, mixed> $data) : self
Parameters
$data : array<string|int, mixed>
Return values
self

createForServerRequest()

public static createForServerRequest(ServerRequestInterface $request) : self
Parameters
$request : ServerRequestInterface
Return values
self

getAttributes()

public getAttributes() : array<string|int, mixed>
Return values
array<string|int, mixed>

getBody()

public getBody() : StreamInterface
Return values
StreamInterface

getMethod()

public getMethod() : string
Return values
string

getParsedBody()

public getParsedBody() : array<string|int, mixed>|null
Return values
array<string|int, mixed>|null

getQueryParams()

public getQueryParams() : array<string|int, mixed>
Return values
array<string|int, mixed>

getRequestTarget()

public getRequestTarget() : string
Return values
string

getUri()

public getUri() : UriInterface
Return values
UriInterface

jsonSerialize()

public jsonSerialize() : array<string|int, mixed>
Return values
array<string|int, mixed>

__construct()

protected __construct() : mixed

clone()

protected static clone(mixed $value) : mixed
Parameters
$value : mixed

        
On this page

Search results