1 | <?php |
||
16 | class ProfileEntity extends AbstractImageUpload |
||
17 | { |
||
18 | /** |
||
19 | * @var int |
||
20 | * |
||
21 | * @ORM\Column(name="id", type="integer") |
||
22 | * @ORM\Id |
||
23 | * @ORM\GeneratedValue(strategy="IDENTITY") |
||
24 | */ |
||
25 | protected $id; |
||
26 | |||
27 | /** |
||
28 | * Mr., Mrs., Ms., Ing., ... |
||
29 | * |
||
30 | * @var string |
||
31 | * |
||
32 | * @ORM\Column(name="title", type="string", length=8, nullable=true) |
||
33 | */ |
||
34 | protected $title; |
||
35 | |||
36 | /** |
||
37 | * @var string |
||
38 | * |
||
39 | * @ORM\Column(name="first_name", type="string", length=32, nullable=true) |
||
40 | */ |
||
41 | protected $firstName; |
||
42 | |||
43 | /** |
||
44 | * @var string |
||
45 | * |
||
46 | * @ORM\Column(name="middle_name", type="string", length=32, nullable=true) |
||
47 | */ |
||
48 | protected $middleName; |
||
49 | |||
50 | /** |
||
51 | * @var string |
||
52 | * |
||
53 | * @ORM\Column(name="last_name", type="string", length=32, nullable=true) |
||
54 | */ |
||
55 | protected $lastName; |
||
56 | |||
57 | /** |
||
58 | * male or female? |
||
59 | * |
||
60 | * @var string |
||
61 | * |
||
62 | * @ORM\Column(name="gender", type="string", length=8, nullable=true) |
||
63 | */ |
||
64 | protected $gender; |
||
65 | |||
66 | /** |
||
67 | * @var \DateTime |
||
68 | * |
||
69 | * @ORM\Column(name="birthdate", type="datetime", nullable=true) |
||
70 | */ |
||
71 | protected $birthdate; |
||
72 | |||
73 | /** |
||
74 | * @var string |
||
75 | * |
||
76 | * @ORM\Column(name="image_url", type="text", nullable=true) |
||
77 | */ |
||
78 | protected $imageUrl; |
||
79 | |||
80 | /** |
||
81 | * @ORM\OneToOne(targetEntity="Application\Entity\UserEntity", inversedBy="profile") |
||
82 | * @ORM\JoinColumn(name="user_id", referencedColumnName="id") |
||
83 | */ |
||
84 | protected $user; |
||
85 | |||
86 | /** |
||
87 | * @var bool |
||
88 | */ |
||
89 | protected $removeImage = false; |
||
90 | |||
91 | /*** Id ***/ |
||
92 | /** |
||
93 | * @return int |
||
94 | */ |
||
95 | public function getId() |
||
99 | |||
100 | /** |
||
101 | * @param int $id |
||
102 | * |
||
103 | * @return ProfileEntity |
||
104 | */ |
||
105 | public function setId($id) |
||
111 | |||
112 | /*** Title ***/ |
||
113 | /** |
||
114 | * @return string |
||
115 | */ |
||
116 | public function getTitle() |
||
120 | |||
121 | /** |
||
122 | * @param string $title |
||
123 | * |
||
124 | * @return ProfileEntity |
||
125 | */ |
||
126 | public function setTitle($title) |
||
132 | |||
133 | /*** Name ***/ |
||
134 | /** |
||
135 | * @return string |
||
136 | */ |
||
137 | public function getName() |
||
141 | |||
142 | /*** First name ***/ |
||
143 | /** |
||
144 | * @return string |
||
145 | */ |
||
146 | public function getFirstName() |
||
150 | |||
151 | /** |
||
152 | * @param string $firstName |
||
153 | * |
||
154 | * @return ProfileEntity |
||
155 | */ |
||
156 | public function setFirstName($firstName) |
||
162 | |||
163 | /*** Middle name ***/ |
||
164 | /** |
||
165 | * @return string |
||
166 | */ |
||
167 | public function getMiddleName() |
||
171 | |||
172 | /** |
||
173 | * @param string $middleName |
||
174 | * |
||
175 | * @return ProfileEntity |
||
176 | */ |
||
177 | public function setMiddleName($middleName) |
||
183 | |||
184 | /*** Last name ***/ |
||
185 | /** |
||
186 | * @return string |
||
187 | */ |
||
188 | public function getLastName() |
||
192 | |||
193 | /** |
||
194 | * @param string $lastName |
||
195 | * |
||
196 | * @return ProfileEntity |
||
197 | */ |
||
198 | public function setLastName($lastName) |
||
204 | |||
205 | /*** Full name ***/ |
||
206 | /** |
||
207 | * @return string |
||
208 | */ |
||
209 | public function getFullName() |
||
218 | |||
219 | /*** Gender ***/ |
||
220 | /** |
||
221 | * @return string |
||
222 | */ |
||
223 | public function getGender() |
||
227 | |||
228 | /** |
||
229 | * @param string $gender |
||
230 | * |
||
231 | * @return ProfileEntity |
||
232 | */ |
||
233 | public function setGender($gender) |
||
239 | |||
240 | /*** Birthdate ***/ |
||
241 | /** |
||
242 | * @return string |
||
243 | */ |
||
244 | public function getBirthdate() |
||
248 | |||
249 | /** |
||
250 | * @param mixed $birthdate |
||
251 | * |
||
252 | * @return ProfileEntity |
||
253 | */ |
||
254 | public function setBirthdate($birthdate = null) |
||
266 | |||
267 | /*** Age ***/ |
||
268 | /** |
||
269 | * @return string |
||
270 | */ |
||
271 | public function getAge($format = '%y') |
||
278 | |||
279 | /*** User ***/ |
||
280 | /** |
||
281 | * @return UserEntity |
||
282 | */ |
||
283 | public function getUser() |
||
287 | |||
288 | /** |
||
289 | * @param UserEntity $user |
||
290 | * |
||
291 | * @return ProfileEntity |
||
292 | */ |
||
293 | public function setUser(UserEntity $user) |
||
299 | |||
300 | /*** Remove image ***/ |
||
301 | /** |
||
302 | * @return bool |
||
303 | */ |
||
304 | public function getRemoveImage() |
||
308 | |||
309 | /** |
||
310 | * @param bool $removeImage |
||
311 | * |
||
312 | * @return PostEntity |
||
313 | */ |
||
314 | public function setRemoveImage($removeImage) |
||
320 | |||
321 | /** |
||
322 | * @return array |
||
323 | */ |
||
324 | public function toArray() |
||
340 | } |
||
341 |