JsonResponse
class JsonResponse extends JsonResponse (View source)
Свойства
| ResponseTrait |
Свойства
| protected int | $jsonOptions | Параметры кодирования JSON. |
Методы
| int | status() Получить код состояния ответа. | из ResponseTrait |
| string | content() Получить содержимое ответа. | из ResponseTrait |
| $this | header(string $key, string $value, bool $replace = true) Установить заголовок ответа. | из ResponseTrait |
| $this | withCookie(Cookie|mixed $cookie) Добавить cookie в ответ. | из ResponseTrait |
| __construct(mixed $data = null, int $status = 200, array $headers = [], int $options) Конструктор. | ||
| mixed | getData(bool $assoc = false, int $depth = 512) Получить данные, декодированные из JSON, из ответа. | |
| setData($data = []) {@inheritdoc} | ||
| int | getJsonOptions() Получить параметры кодирования JSON. | |
| mixed | setJsonOptions(int $options) Установить параметры кодирования JSON. |
Подробное описание
int status()
Получить код состояния ответа.
string content()
Получить содержимое ответа.
$this header(string $key, string $value, bool $replace = true)
Установить заголовок ответа.
$this withCookie(Cookie|mixed $cookie)
Добавить cookie в ответ.
__construct(mixed $data = null, int $status = 200, array $headers = [], int $options)
Конструктор.
mixed getData(bool $assoc = false, int $depth = 512)
Получить данные, декодированные из JSON, из ответа.
setData($data = [])
{@inheritdoc}
int getJsonOptions()
Получить параметры кодирования JSON.
mixed setJsonOptions(int $options)
Установить параметры кодирования JSON.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/5.1/Illuminate/Http/JsonResponse.html