| 1 | <?php |
||
| 9 | class Decoder extends AbstractJson |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * @var array |
||
| 13 | */ |
||
| 14 | protected $options = [ |
||
| 15 | JSON_BIGINT_AS_STRING => false, |
||
| 16 | ]; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * @var bool |
||
| 20 | */ |
||
| 21 | protected $decodeAsArray = true; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * @var int |
||
| 25 | */ |
||
| 26 | protected $decodeDepth = 512; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * Decode json string to value |
||
| 30 | * |
||
| 31 | * @param string $jsonString |
||
| 32 | * @return mixed |
||
| 33 | */ |
||
| 34 | public function decode($jsonString) |
||
| 40 | |||
| 41 | /** |
||
| 42 | * Set decode as array |
||
| 43 | * |
||
| 44 | * @return $this; |
||
|
|
|||
| 45 | */ |
||
| 46 | public function setDecodeAsArray() |
||
| 51 | |||
| 52 | /** |
||
| 53 | * Set decode as object |
||
| 54 | * |
||
| 55 | * @return $this; |
||
| 56 | */ |
||
| 57 | public function setDecodeAsObject() |
||
| 62 | |||
| 63 | /** |
||
| 64 | * Set decode depth |
||
| 65 | * |
||
| 66 | * @param int $decodeDepth |
||
| 67 | * @return $this; |
||
| 68 | */ |
||
| 69 | public function setDecodeDepth($decodeDepth) |
||
| 74 | |||
| 75 | /** |
||
| 76 | * Set encode option JSON_BIGINT_AS_STRING |
||
| 77 | * |
||
| 78 | * @param bool $value |
||
| 79 | * @return $this |
||
| 80 | */ |
||
| 81 | public function enableBigIntAsString($value = true) |
||
| 85 | } |
This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.