1 | <?php |
||
26 | class PgJson implements ConverterInterface |
||
27 | { |
||
28 | protected $is_array; |
||
29 | |||
30 | /** |
||
31 | * __construct |
||
32 | * |
||
33 | * Configure the JSON converter to decode JSON as StdObject instances or |
||
34 | * arrays (default). |
||
35 | * |
||
36 | * @param boolean $is_array |
||
37 | */ |
||
38 | public function __construct($is_array = null) |
||
42 | |||
43 | /** |
||
44 | * fromPg |
||
45 | * |
||
46 | * @see ConverterInterface |
||
47 | */ |
||
48 | public function fromPg($data, $type, Session $session) |
||
69 | |||
70 | /** |
||
71 | * toPg |
||
72 | * |
||
73 | * @see ConverterInterface |
||
74 | */ |
||
75 | public function toPg($data, $type, Session $session) |
||
83 | |||
84 | /** |
||
85 | * toPgStandardFormat |
||
86 | * |
||
87 | * @see ConverterInterface |
||
88 | */ |
||
89 | public function toPgStandardFormat($data, $type, Session $session) |
||
97 | |||
98 | /** |
||
99 | * jsonEncode |
||
100 | * |
||
101 | * Encode data to Json. Throw an exception if an error occurs. |
||
102 | * |
||
103 | * @param mixed $data |
||
104 | * @throws ConverterException |
||
105 | * @return string |
||
106 | */ |
||
107 | protected function jsonEncode($data) |
||
123 | } |
||
124 |