php/Controllers/API/GenericEntityFetchController.php 1 location
|
@@ 162-167 (lines=6) @@
|
| 159 |
|
/** @var string $serializedEntity */ |
| 160 |
|
$serializedEntity = ""; |
| 161 |
|
|
| 162 |
|
if ($this->encoder instanceof EncoderInterface) { |
| 163 |
|
$serializedEntity = $this->encoder->encode($normalizedEntity, $this->format); |
| 164 |
|
|
| 165 |
|
} else { |
| 166 |
|
$serializedEntity = json_encode($normalizedEntity); |
| 167 |
|
} |
| 168 |
|
|
| 169 |
|
return new Response($serializedEntity); |
| 170 |
|
} |
php/Controllers/API/GenericEntityListingController.php 1 location
|
@@ 161-166 (lines=6) @@
|
| 158 |
|
/** @var string $serializedEntity */ |
| 159 |
|
$serializedEntity = ""; |
| 160 |
|
|
| 161 |
|
if ($this->encoder instanceof EncoderInterface) { |
| 162 |
|
$serializedEntity = $this->encoder->encode($resultEntries, $this->format); |
| 163 |
|
|
| 164 |
|
} else { |
| 165 |
|
$serializedEntity = json_encode($resultEntries); |
| 166 |
|
} |
| 167 |
|
|
| 168 |
|
return new Response($serializedEntity); |
| 169 |
|
} |