1 | <?php |
||
18 | class Author extends AbstractEntity |
||
19 | { |
||
20 | /** |
||
21 | * @var string |
||
22 | */ |
||
23 | private $name; |
||
24 | |||
25 | /** |
||
26 | * @var string |
||
27 | */ |
||
28 | private $email; |
||
29 | |||
30 | /** |
||
31 | * @var string |
||
32 | */ |
||
33 | private $bio; |
||
34 | |||
35 | /** |
||
36 | * @var DateTime|null |
||
37 | */ |
||
38 | private $birthdate; |
||
39 | |||
40 | /** |
||
41 | * Author constructor. |
||
42 | * @param string $name |
||
43 | * @param string $email |
||
44 | * @param string $bio |
||
45 | * @param string|null $id |
||
46 | * @param DateTime|null $birthdate |
||
47 | * @throws InvalidUuidStringException |
||
48 | */ |
||
49 | 26 | public function __construct(string $name, string $email, string $bio, string $id = null, DateTime $birthdate = null) |
|
57 | |||
58 | /** |
||
59 | * @codeCoverageIgnore |
||
60 | * @return string |
||
61 | */ |
||
62 | public function getName(): string |
||
66 | |||
67 | /** |
||
68 | * @codeCoverageIgnore |
||
69 | * @param string $name |
||
70 | */ |
||
71 | public function setName(string $name) |
||
75 | |||
76 | /** |
||
77 | * @codeCoverageIgnore |
||
78 | * @return string |
||
79 | */ |
||
80 | public function getEmail(): string |
||
84 | |||
85 | /** |
||
86 | * @param string $email |
||
87 | */ |
||
88 | 27 | public function setEmail(string $email) |
|
96 | |||
97 | /** |
||
98 | * @codeCoverageIgnore |
||
99 | * @return string |
||
100 | */ |
||
101 | public function getBio(): string |
||
105 | |||
106 | /** |
||
107 | * @codeCoverageIgnore |
||
108 | * @param string $bio |
||
109 | */ |
||
110 | public function setBio(string $bio) |
||
114 | |||
115 | /** |
||
116 | * @codeCoverageIgnore |
||
117 | * @return DateTime|null |
||
118 | */ |
||
119 | public function getBirthdate() |
||
123 | |||
124 | /** |
||
125 | * @codeCoverageIgnore |
||
126 | * @param DateTime|null $birthdate |
||
127 | */ |
||
128 | public function setBirthdate(DateTime $birthdate = null) |
||
132 | } |
||
133 |