|
| $errors = [] |
|
| $data = [] |
|
| $contentType = "application/json" |
|
Protected Attributes inherited from SlaxWeb\Output\AbstractHandler |
| $contentType = "" |
|
| $statusCode = 200 |
|
SlaxWeb\Output\Handler\Json::add |
( |
array |
$data | ) |
|
Add Data
Adds an array of data to the internal container. New data is recursively merged into the existing array, overwritting previously set data.
- Parameters
-
array | $data | Data array to be merged with previsouly added data |
- Returns
- self
SlaxWeb\Output\Handler\Json::addError |
( |
string |
$error, |
|
|
int |
$code = 500 , |
|
|
array |
$errorData = [] |
|
) |
| |
SlaxWeb\Output\Handler\Json::render |
( |
| ) |
|
SlaxWeb\Output\Handler\Json::setStatusCode |
( |
int |
$code = 200 | ) |
|
Set Status Code
Sets the HTTP Response Status code and returns an instance of itself.
- Parameters
-
int | $code | HTTP Status code for the response, default int(200) |
- Returns
- self
The documentation for this class was generated from the following file:
- /opt/slax0rDev/slaxweb/output/src/Handler/Json.php