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