src/EventSourcing/DBAL/AggregateAwareDBALEventStore.php 1 location
|
@@ 206-215 (lines=10) @@
|
| 203 |
|
* @param $row |
| 204 |
|
* @return DomainMessage |
| 205 |
|
*/ |
| 206 |
|
private function deserializeEvent($row) |
| 207 |
|
{ |
| 208 |
|
return new DomainMessage( |
| 209 |
|
$row['uuid'], |
| 210 |
|
$row['playhead'], |
| 211 |
|
$this->metadataSerializer->deserialize(json_decode($row['metadata'], true)), |
| 212 |
|
$this->payloadSerializer->deserialize(json_decode($row['payload'], true)), |
| 213 |
|
DateTime::fromString($row['recorded_on']) |
| 214 |
|
); |
| 215 |
|
} |
| 216 |
|
|
| 217 |
|
/** |
| 218 |
|
* Ensure that an error will be thrown if the ID in the domain messages is |
src/EventSourcing/DBAL/EventStream.php 1 location
|
@@ 224-233 (lines=10) @@
|
| 221 |
|
* @param $row |
| 222 |
|
* @return DomainMessage |
| 223 |
|
*/ |
| 224 |
|
private function deserializeEvent($row) |
| 225 |
|
{ |
| 226 |
|
return new DomainMessage( |
| 227 |
|
$row['uuid'], |
| 228 |
|
$row['playhead'], |
| 229 |
|
$this->metadataSerializer->deserialize(json_decode($row['metadata'], true)), |
| 230 |
|
$this->payloadSerializer->deserialize(json_decode($row['payload'], true)), |
| 231 |
|
DateTime::fromString($row['recorded_on']) |
| 232 |
|
); |
| 233 |
|
} |
| 234 |
|
} |
| 235 |
|
|