Method | Description | |
---|---|---|
__construct ( string | array | |
Base constructor. | |
sendJson ( string | array | |
Creates a JsonResponse instance and sends the output to the browser. |
public __construct ( string | array | |
||
$content | string | array | |
Json content. |
$headers | array | Headers to attach to the response. |
$prettyPrint | boolean | Should we use JSON_PRETTY_PRINT to nicely format the output. |