|
@@ 41-43 (lines=3) @@
|
| 38 |
|
foreach ($this->propertyPaths as $i => $propertyPath) { |
| 39 |
|
try { |
| 40 |
|
if (($property = $this->propertyAccessor->getValue($this->iterator->current()[0], $propertyPath)) instanceof PersistentCollection) { |
| 41 |
|
if (!(isset($data[(string) $propertyPath]) && is_array($data[(string) $propertyPath]))) { |
| 42 |
|
$data[(string) $propertyPath] = []; |
| 43 |
|
} |
| 44 |
|
|
| 45 |
|
foreach ($property as $subEntity) { |
| 46 |
|
$data[(string) $propertyPath][] = (string) $subEntity; |
|
@@ 56-58 (lines=3) @@
|
| 53 |
|
$subProperty = preg_replace('/^.+\./U', '', $propertyPath); |
| 54 |
|
if ($collection != (string) $propertyPath && $subProperty) { |
| 55 |
|
if (($property = $this->propertyAccessor->getValue($this->iterator->current()[0], $collection)) instanceof PersistentCollection) { |
| 56 |
|
if (!(isset($data[$collection]) && is_array($data[$collection]))) { |
| 57 |
|
$data[$collection] = []; |
| 58 |
|
} |
| 59 |
|
|
| 60 |
|
foreach ($property as $subEntity) { |
| 61 |
|
$data[$collection][spl_object_hash($subEntity)][$subProperty] = (string) $this->propertyAccessor->getValue($subEntity, $subProperty); |