RestRendererV1
extends RendererBasic
in package
Table of Contents
Methods
- returnException() : void
- Return Exception Response
- returnResponse() : void
- Return Response
- getHttpResponseCode() : int
- Get HTTP response code from command response status.
- renderJSON() : void
- Return data to browser as JSON and end application.
Methods
returnException()
Return Exception Response
public
returnException(Exception $exception) : void
Parameters
- $exception : Exception
returnResponse()
Return Response
public
returnResponse(Response $response) : void
Parameters
- $response : Response
getHttpResponseCode()
Get HTTP response code from command response status.
protected
getHttpResponseCode(Status $status) : int
Parameters
- $status : Status
Return values
intrenderJSON()
Return data to browser as JSON and end application.
protected
renderJSON(array<string|int, mixed>|null $data[, int $responseCode = 200 ]) : void
Parameters
- $data : array<string|int, mixed>|null
- $responseCode : int = 200