| 1 | <?php |
||
| 7 | final class Book implements Aggregate |
||
| 8 | { |
||
| 9 | /** @var UuidInterface */ |
||
| 10 | private $bookId; |
||
| 11 | /** @var string */ |
||
| 12 | private $title; |
||
| 13 | /** @var string */ |
||
| 14 | private $authors; |
||
| 15 | /** @var string */ |
||
| 16 | private $isbn; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * @param UuidInterface $bookId |
||
| 20 | * @param string $title |
||
| 21 | * @param string $authors |
||
| 22 | * @param string $isbn |
||
| 23 | */ |
||
| 24 | public function __construct(UuidInterface $bookId, $title, $authors, $isbn) |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @return UuidInterface |
||
| 34 | */ |
||
| 35 | public function id() |
||
| 39 | |||
| 40 | /** |
||
| 41 | * @return string |
||
| 42 | */ |
||
| 43 | public function title() |
||
| 47 | |||
| 48 | /** |
||
| 49 | * @return string |
||
| 50 | */ |
||
| 51 | public function authors() |
||
| 55 | |||
| 56 | /** |
||
| 57 | * @return string |
||
| 58 | */ |
||
| 59 | public function isbn() |
||
| 63 | } |
||
| 64 |