@@ -71,6 +71,11 @@ class InputParamsResolver
71
71
*/
72
72
private $ methodsMap ;
73
73
74
+ /**
75
+ * @var array
76
+ */
77
+ private array $ inputData = [];
78
+
74
79
/**
75
80
* Initialize dependencies.
76
81
*
@@ -157,8 +162,14 @@ public function resolve()
157
162
*/
158
163
public function getInputData ()
159
164
{
165
+ if (!empty ($ this ->inputData )) {
166
+ return $ this ->inputData ;
167
+ }
168
+
160
169
if ($ this ->isBulk === false ) {
161
- return [$ this ->inputParamsResolver ->getInputData ()];
170
+ $ this ->inputData = [$ this ->inputParamsResolver ->getInputData ()];
171
+
172
+ return $ this ->inputData ;
162
173
}
163
174
$ inputData = $ this ->request ->getRequestData ();
164
175
@@ -168,7 +179,7 @@ public function getInputData()
168
179
$ inputData = array_merge ($ requestBodyParams , $ inputData );
169
180
}
170
181
171
- return array_map (function ($ singleEntityParams ) {
182
+ $ this -> inputData = array_map (function ($ singleEntityParams ) {
172
183
if (is_array ($ singleEntityParams )) {
173
184
$ singleEntityParams = $ this ->filterInputData ($ singleEntityParams );
174
185
$ singleEntityParams = $ this ->paramsOverrider ->override (
@@ -179,6 +190,8 @@ public function getInputData()
179
190
180
191
return $ singleEntityParams ;
181
192
}, $ inputData );
193
+
194
+ return $ this ->inputData ;
182
195
}
183
196
184
197
/**
0 commit comments