JsonResponse
class JsonResponse extends JsonResponse (View source)
Traits
Methods
$this
header(
string $key,
string $value,
bool $replace = true)
Set a header on the Response.
from ResponseTrait
__construct(
mixed $data = null,
int $status = 200,
array $headers = array(),
int $options)
Constructor.
mixed
getData(
bool $assoc = false,
int $depth = 512)
Get the json_decoded data from the response.
setData($data = array())
{@inheritdoc}
int
getJsonOptions()
Get the JSON encoding options.
setEncodingOptions($encodingOptions)
{@inheritdoc}
mixed
setJsonOptions(
int $options)
Set the JSON encoding options.
Details
in ResponseTrait at line line 35
$this
header(
string $key,
string $value,
bool $replace = true)
Set a header on the Response.
in ResponseTrait at line line 48
$this
withHeaders(
array $headers)
Add an array of headers to the response.
in ResponseTrait at line line 74
$this
withCookie(
Cookie|mixed $cookie)
Add a cookie to the response.
at line line 23
__construct(
mixed $data = null,
int $status = 200,
array $headers = array(),
int $options)
Constructor.
at line line 37
mixed
getData(
bool $assoc = false,
int $depth = 512)
Get the json_decoded data from the response.