1 | <?php |
||
20 | final class CommentViewModel |
||
21 | { |
||
22 | /** |
||
23 | * @var string |
||
24 | */ |
||
25 | private $id; |
||
26 | |||
27 | /** |
||
28 | * @var string |
||
29 | */ |
||
30 | private $content; |
||
31 | |||
32 | /** |
||
33 | * @var DateTimeInterface |
||
34 | */ |
||
35 | private $publishedAt; |
||
36 | |||
37 | private function __construct( |
||
46 | |||
47 | public static function constructFromEntity(Comment $comment): self |
||
55 | |||
56 | public function getId(): string |
||
60 | |||
61 | public function getContent(): string |
||
65 | |||
66 | public function getPublishedAt(): DateTimeInterface |
||
70 | } |
||
71 |