| 1 | <?php |
||
| 17 | class Notification |
||
| 18 | { |
||
| 19 | private $id; |
||
| 20 | private $body; |
||
| 21 | private $publishedOn; |
||
| 22 | private $readOn; |
||
| 23 | private $status; |
||
| 24 | |||
| 25 | private function __construct(NotificationId $id, NotificationBody $body) |
||
| 32 | |||
| 33 | public static function broadcast(NotificationId $id, NotificationBody $body) : self |
||
| 37 | |||
| 38 | public function read() : void |
||
| 43 | |||
| 44 | public function unread() : void |
||
| 49 | |||
| 50 | public function id() : NotificationId |
||
| 54 | |||
| 55 | public function body() : NotificationBody |
||
| 59 | |||
| 60 | public function publishedOn() : \DateTimeInterface |
||
| 64 | |||
| 65 | public function readOn() : ?\DateTimeInterface |
||
| 69 | |||
| 70 | public function status() : NotificationStatus |
||
| 74 | |||
| 75 | public function __toString() : string |
||
| 79 | } |
||
| 80 |