JsonHttpControllerResponse
extends HttpControllerResponse
in package
Class JsonHttpControllerResponse
Tags
Table of Contents
- $httpBody : string
- $httpHeadersArray : array<string|int, mixed>
- __construct() : mixed
- Initializes the json http controller response.
- getBody() : string
- Returns the response body string.
- getHeaders() : array<string|int, mixed>
- Returns the response headers array.
Properties
$httpBody
protected
string
$httpBody
$httpHeadersArray
protected
array<string|int, mixed>
$httpHeadersArray
= []
Methods
__construct()
Initializes the json http controller response.
public
__construct(array<string|int, mixed> $contentArray[, array<string|int, mixed> $responseHeadersArray = null ]) : mixed
Parameters
- $contentArray : array<string|int, mixed>
-
Array which will be encoded in json format.
- $responseHeadersArray : array<string|int, mixed> = null
-
Array which contains information about the http response headers.
Return values
mixed —getBody()
Returns the response body string.
public
getBody() : string
Return values
string —getHeaders()
Returns the response headers array.
public
getHeaders() : array<string|int, mixed>