PHP Класс yii\web\JsonParser
To enable parsing for JSON requests you can configure [[Request::parsers]] using this class:
php
'request' => [
'parsers' => [
'application/json' => 'yii\web\JsonParser',
]
]
Показать файл
Открыть проект
Примеры использования класса
Открытые свойства
Открытые методы
Описание методов
Parses a HTTP request body.
public parse ( string $rawBody, string $contentType ) : array |
$rawBody |
string |
the raw HTTP request body. |
$contentType |
string |
the content type specified for the request body. |
Результат |
array |
parameters parsed from the request body |
Описание свойств
$asArray публичное свойство
whether to return objects in terms of associative arrays.
$throwException публичное свойство