Response
in package
implements
JsonSerializable
Tags
Interfaces, Classes and Traits
- JsonSerializable
Table of Contents
- $body : mixed
- $code : mixed
- $headers : mixed
- $origHeaders : mixed
- __construct() : mixed
- fromJson() : self
- getBody() : mixed
- getHeader() : string
- getHeaders() : array<string|int, mixed>
- getOrigHeaders() : array<string|int, mixed>
- getStatusCode() : int
- jsonSerialize() : mixed
- parseHeaders() : array<string|int, mixed>
Properties
$body
private
mixed
$body
$code
private
mixed
$code
$headers
private
mixed
$headers
$origHeaders
private
mixed
$origHeaders
Methods
__construct()
public
__construct(mixed $body[, array<string|int, mixed> $headers = [] ][, int $code = 200 ]) : mixed
Parameters
- $body : mixed
-
The response as JSON
- $headers : array<string|int, mixed> = []
- $code : int = 200
Return values
mixed —fromJson()
public
static fromJson(array<string|int, mixed> $json) : self
Parameters
- $json : array<string|int, mixed>
Return values
self —getBody()
public
getBody() : mixed
Return values
mixed —getHeader()
public
getHeader(string $name) : string
Parameters
- $name : string
Return values
string —getHeaders()
public
getHeaders(string $name) : array<string|int, mixed>
Parameters
- $name : string
Return values
array<string|int, mixed> —getOrigHeaders()
public
getOrigHeaders() : array<string|int, mixed>
Return values
array<string|int, mixed> —getStatusCode()
public
getStatusCode() : int
Return values
int —jsonSerialize()
public
jsonSerialize() : mixed
Return values
mixed —parseHeaders()
private
parseHeaders(array<string|int, mixed> $headers) : array<string|int, mixed>
Parameters
- $headers : array<string|int, mixed>