@@ 183-191 (lines=9) @@ | ||
180 | ||
181 | $includeObjects = $this->createIncludeObjects($includeObject); |
|
182 | ||
183 | foreach ($includeObjects as $object) { |
|
184 | $includeType = $object['type']; |
|
185 | $includeId = $object['id']; |
|
186 | $cacheKey = "$includeType:$includeId"; |
|
187 | if (!array_key_exists($cacheKey, $linkedIds)) { |
|
188 | $serializedData[] = $object; |
|
189 | $linkedIds[$cacheKey] = $object; |
|
190 | } |
|
191 | } |
|
192 | } |
|
193 | } |
|
194 | ||
@@ 393-402 (lines=10) @@ | ||
390 | foreach ($data as $value) { |
|
391 | foreach ($value as $includeObject) { |
|
392 | if (isset($includeObject['included'])) { |
|
393 | foreach ($includeObject['included'] as $object) { |
|
394 | $includeType = $object['type']; |
|
395 | $includeId = $object['id']; |
|
396 | $cacheKey = "$includeType:$includeId"; |
|
397 | ||
398 | if (!array_key_exists($cacheKey, $linkedIds)) { |
|
399 | $includedData[] = $object; |
|
400 | $linkedIds[$cacheKey] = $object; |
|
401 | } |
|
402 | } |
|
403 | } |
|
404 | } |
|
405 | } |