1 | <?php |
||
15 | class JsonResponseParser { |
||
16 | |||
17 | /** |
||
18 | * @var DataValueDeserializer |
||
19 | */ |
||
20 | private $dataValueDeserializer; |
||
21 | |||
22 | /** |
||
23 | * @var ResponsePropertyList |
||
24 | */ |
||
25 | private $responsePropertyList; |
||
26 | |||
27 | /** |
||
28 | * @var array |
||
29 | */ |
||
30 | private $subjectList = array(); |
||
31 | |||
32 | /** |
||
33 | * @var boolean |
||
34 | */ |
||
35 | private $furtherResults = false; |
||
36 | |||
37 | /** |
||
38 | * @var array |
||
39 | */ |
||
40 | private $printouts = array(); |
||
41 | |||
42 | /** |
||
43 | * @var string |
||
44 | */ |
||
45 | private $rawResponseResult = array(); |
||
46 | |||
47 | /** |
||
48 | * @since 1.0 |
||
49 | * |
||
50 | * @param DataValueDeserializer $dataValueDeserializer |
||
51 | */ |
||
52 | 14 | public function __construct( DataValueDeserializer $dataValueDeserializer ) { |
|
56 | |||
57 | /** |
||
58 | * @since 1.0 |
||
59 | * |
||
60 | * @param DIProperty $property |
||
61 | * |
||
62 | * @return DIProperty |
||
63 | */ |
||
64 | 3 | public function findPropertyFromInMemoryExternalRepositoryCache( DIProperty $property ) { |
|
74 | |||
75 | /** |
||
76 | * @since 1.0 |
||
77 | * |
||
78 | * @param DIWikiPage[] |
||
79 | */ |
||
80 | 8 | public function getResultSubjectList() { |
|
83 | |||
84 | /** |
||
85 | * @since 1.0 |
||
86 | * |
||
87 | * @param [] |
||
88 | */ |
||
89 | public function getPrintouts() { |
||
92 | |||
93 | /** |
||
94 | * @since 1.0 |
||
95 | * |
||
96 | * @param [] |
||
97 | */ |
||
98 | 8 | public function getPrintRequestPropertyList() { |
|
101 | |||
102 | /** |
||
103 | * @since 1.0 |
||
104 | * |
||
105 | * @return boolean |
||
106 | */ |
||
107 | 12 | public function hasFurtherResults() { |
|
110 | |||
111 | /** |
||
112 | * @since 1.0 |
||
113 | * |
||
114 | * @return array |
||
115 | */ |
||
116 | 5 | public function getRawResponseResult() { |
|
119 | |||
120 | /** |
||
121 | * @since 1.0 |
||
122 | * |
||
123 | * @param DIWikiPage $subject |
||
124 | * @param DIProperty $property |
||
125 | * |
||
126 | * @return array |
||
127 | */ |
||
128 | public function getPropertyValuesFor( DIWikiPage $subject, DIProperty $property ) { |
||
135 | |||
136 | /** |
||
137 | * @since 1.0 |
||
138 | * |
||
139 | * @param array $result |
||
140 | */ |
||
141 | 13 | public function doParse( array $result ) { |
|
167 | |||
168 | 8 | private function addResultsToPrintoutList( $k, $value ) { |
|
194 | |||
195 | 8 | private function addPropertyValues( $hash, $pk, $pvalues ) { |
|
221 | |||
222 | } |
||
223 |
Unless you are absolutely sure that the expression can never be null because of other conditions, we strongly recommend to add an additional type check to your code: