1 | <?php |
||
10 | class AbstractJson |
||
11 | { |
||
12 | /** |
||
13 | * @var array |
||
14 | */ |
||
15 | protected $options = []; |
||
16 | |||
17 | /** |
||
18 | * Set encode value |
||
19 | * |
||
20 | * @param int $key |
||
21 | * @param bool $value |
||
22 | * @return $this |
||
23 | */ |
||
24 | protected function setOption($key, $value) |
||
31 | |||
32 | /** |
||
33 | * Generate options list |
||
34 | * |
||
35 | * @return int |
||
36 | */ |
||
37 | protected function generateOptions() |
||
47 | |||
48 | /** |
||
49 | * Check json encoding errors |
||
50 | * |
||
51 | * @throws \Exception |
||
52 | */ |
||
53 | protected function checkJsonErrors() |
||
59 | |||
60 | /** |
||
61 | * Clear options |
||
62 | * |
||
63 | * @return $this |
||
64 | */ |
||
65 | public function clearOptions() |
||
70 | |||
71 | /** |
||
72 | * Set options |
||
73 | * |
||
74 | * @param array $options |
||
75 | * @return $this |
||
76 | */ |
||
77 | public function setOptions(array $options) |
||
84 | } |