@@ -123,7 +123,9 @@ public function __construct(
123
123
public function get ($ path = '' )
124
124
{
125
125
if ($ path === '' ) {
126
- $ this ->data = array_replace_recursive ($ this ->data , $ this ->loadAllData ());
126
+ $ this ->data = array_replace_recursive ($ this ->data , $ allData = $ this ->loadAllData ());
127
+ $ allData = $ this ->postProcessor ->process ($ allData );
128
+ $ this ->data = array_replace_recursive ($ this ->data , $ allData );
127
129
128
130
return $ this ->data ;
129
131
}
@@ -154,7 +156,9 @@ private function getWithParts($path)
154
156
155
157
if ($ scopeType === ScopeInterface::SCOPE_DEFAULT ) {
156
158
if (!isset ($ this ->data [$ scopeType ])) {
157
- $ this ->data = array_replace_recursive ($ this ->data , $ this ->loadDefaultScopeData ($ scopeType ));
159
+ $ this ->data = array_replace_recursive ($ this ->data , $ scopeData = $ this ->loadDefaultScopeData ($ scopeType ));
160
+ $ scopeData = $ this ->postProcessor ->process ($ scopeData );
161
+ $ this ->data = array_replace_recursive ($ this ->data , $ scopeData );
158
162
}
159
163
160
164
return $ this ->getDataByPathParts ($ this ->data [$ scopeType ], $ pathParts );
@@ -165,6 +169,8 @@ private function getWithParts($path)
165
169
if (!isset ($ this ->data [$ scopeType ][$ scopeId ])) {
166
170
$ scopeData = $ this ->loadScopeData ($ scopeType , $ scopeId );
167
171
$ this ->data = array_replace_recursive ($ this ->data , $ scopeData );
172
+ $ scopeData = $ this ->postProcessor ->process ($ scopeData );
173
+ $ this ->data = array_replace_recursive ($ this ->data , $ scopeData );
168
174
}
169
175
170
176
return isset ($ this ->data [$ scopeType ][$ scopeId ])
@@ -186,7 +192,6 @@ private function loadAllData()
186
192
} else {
187
193
$ data = $ this ->serializer ->unserialize ($ cachedData );
188
194
}
189
- $ data = $ this ->postProcessor ->process ($ data );
190
195
191
196
return $ data ;
192
197
}
@@ -207,7 +212,6 @@ private function loadDefaultScopeData($scopeType)
207
212
} else {
208
213
$ data = [$ scopeType => $ this ->serializer ->unserialize ($ cachedData )];
209
214
}
210
- $ data = $ this ->postProcessor ->process ($ data );
211
215
212
216
return $ data ;
213
217
}
@@ -238,7 +242,6 @@ private function loadScopeData($scopeType, $scopeId)
238
242
} else {
239
243
$ data = [$ scopeType => [$ scopeId => $ this ->serializer ->unserialize ($ cachedData )]];
240
244
}
241
- $ data = $ this ->postProcessor ->process ($ data );
242
245
243
246
return $ data ;
244
247
}
0 commit comments