| 1 | <?php |
||
| 19 | final class StandardJsonEncoder implements PayloadEncoderInterface |
||
| 20 | { |
||
| 21 | /** |
||
| 22 | * @var int |
||
| 23 | */ |
||
| 24 | private $options; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @var bool |
||
| 28 | */ |
||
| 29 | private $associative; |
||
| 30 | |||
| 31 | /** |
||
| 32 | * @var int |
||
| 33 | */ |
||
| 34 | private $depth; |
||
| 35 | |||
| 36 | /** |
||
| 37 | * StandardJsonEncoder constructor. |
||
| 38 | * See also json_encode and json_decode parameters. |
||
| 39 | * |
||
| 40 | * @param int $options |
||
| 41 | * @param bool $associative |
||
| 42 | * @param int $depth |
||
| 43 | */ |
||
| 44 | public function __construct(int $options = 0, bool $associative = false, int $depth = 512) |
||
| 50 | |||
| 51 | /** |
||
| 52 | * {@inheritdoc} |
||
| 53 | */ |
||
| 54 | public function encode($payload): string |
||
| 58 | |||
| 59 | /** |
||
| 60 | * {@inheritdoc} |
||
| 61 | */ |
||
| 62 | public function decode(string $payload) |
||
| 66 | } |
||
| 67 |