Notifier/src/Kreta/Notifier/Domain/Model/Inbox/Notification/Notification.php 1 location
|
@@ 92-101 (lines=10) @@
|
| 89 |
|
$this->status = $event->status(); |
| 90 |
|
} |
| 91 |
|
|
| 92 |
|
public static function reconstitute(Stream $stream) : self |
| 93 |
|
{ |
| 94 |
|
$notification = new self($stream->name()->aggregateId()); |
| 95 |
|
$events = $stream->events()->toArray(); |
| 96 |
|
foreach ($events as $event) { |
| 97 |
|
$notification->apply($event); |
| 98 |
|
} |
| 99 |
|
|
| 100 |
|
return $notification; |
| 101 |
|
} |
| 102 |
|
|
| 103 |
|
public function id() : NotificationId |
| 104 |
|
{ |
Notifier/src/Kreta/Notifier/Domain/Model/Inbox/User.php 1 location
|
@@ 42-51 (lines=10) @@
|
| 39 |
|
{ |
| 40 |
|
} |
| 41 |
|
|
| 42 |
|
public static function reconstitute(Stream $stream) : self |
| 43 |
|
{ |
| 44 |
|
$user = new self($stream->name()->aggregateId()); |
| 45 |
|
$events = $stream->events()->toArray(); |
| 46 |
|
foreach ($events as $event) { |
| 47 |
|
$user->apply($event); |
| 48 |
|
} |
| 49 |
|
|
| 50 |
|
return $user; |
| 51 |
|
} |
| 52 |
|
|
| 53 |
|
public function id() : UserId |
| 54 |
|
{ |