final class JsonResponse implements Response

JSON response used mainly for AJAX requests.

Methods

__construct(mixed $payload, string|null $contentType = null)

No description

mixed
getPayload()

No description

string
getContentType()

Returns the MIME content type of a downloaded file.

void
send(IRequest $httpRequest, IResponse $httpResponse)

Sends response to output.

Details

at line 24
__construct(mixed $payload, string|null $contentType = null)

No description

Parameters

mixed $payload
string|null $contentType

at line 31
mixed getPayload()

No description

Return Value

mixed

at line 40
string getContentType()

Returns the MIME content type of a downloaded file.

Return Value

string

at line 49
void send(IRequest $httpRequest, IResponse $httpResponse)

Sends response to output.

Parameters

IRequest $httpRequest
IResponse $httpResponse

Return Value

void