MODE_JSON
MODE_JSON
ApiJsonResponseProvider implements a response provider based on ApiResponseProvider
ApiJsonResponseProvider provides end user data in json format.
sendData(array $data, int $status, array $headers)
Function converts $data array to appropriate format, sends it to client and terminates the application.
Usage example:
$this->sendData(
array(...),
200,
array(
"Content-Range: items $offset-$limit/$total",
...
)
);
| array | $data | |
| int | $status | code. |
| array | $headers | http headers array. |