[BUGFIX] Use correct property for images in FrontendUser
[Packages/TYPO3.CMS.git] / typo3 / sysext / extbase / Classes / Domain / Model / FrontendUser.php
1 <?php
2 namespace TYPO3\CMS\Extbase\Domain\Model;
3
4 /*
5 * This file is part of the TYPO3 CMS project.
6 *
7 * It is free software; you can redistribute it and/or modify it under
8 * the terms of the GNU General Public License, either version 2
9 * of the License, or any later version.
10 *
11 * For the full copyright and license information, please read the
12 * LICENSE.txt file that was distributed with this source code.
13 *
14 * The TYPO3 project - inspiring people to share!
15 */
16
17 /**
18 * A Frontend User
19 *
20 * @api
21 */
22 class FrontendUser extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
23 {
24 /**
25 * @var string
26 */
27 protected $username = '';
28
29 /**
30 * @var string
31 */
32 protected $password = '';
33
34 /**
35 * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FrontendUserGroup>
36 */
37 protected $usergroup;
38
39 /**
40 * @var string
41 */
42 protected $name = '';
43
44 /**
45 * @var string
46 */
47 protected $firstName = '';
48
49 /**
50 * @var string
51 */
52 protected $middleName = '';
53
54 /**
55 * @var string
56 */
57 protected $lastName = '';
58
59 /**
60 * @var string
61 */
62 protected $address = '';
63
64 /**
65 * @var string
66 */
67 protected $telephone = '';
68
69 /**
70 * @var string
71 */
72 protected $fax = '';
73
74 /**
75 * @var string
76 */
77 protected $email = '';
78
79 /**
80 * @var string
81 */
82 protected $lockToDomain = '';
83
84 /**
85 * @var string
86 */
87 protected $title = '';
88
89 /**
90 * @var string
91 */
92 protected $zip = '';
93
94 /**
95 * @var string
96 */
97 protected $city = '';
98
99 /**
100 * @var string
101 */
102 protected $country = '';
103
104 /**
105 * @var string
106 */
107 protected $www = '';
108
109 /**
110 * @var string
111 */
112 protected $company = '';
113
114 /**
115 * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference>
116 */
117 protected $image = null;
118
119 /**
120 * @var \DateTime|NULL
121 */
122 protected $lastlogin = null;
123
124 /**
125 * Constructs a new Front-End User
126 *
127 * @param string $username
128 * @param string $password
129 * @api
130 */
131 public function __construct($username = '', $password = '')
132 {
133 $this->username = $username;
134 $this->password = $password;
135 $this->usergroup = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
136 }
137
138 /**
139 * Sets the username value
140 *
141 * @param string $username
142 * @return void
143 * @api
144 */
145 public function setUsername($username)
146 {
147 $this->username = $username;
148 }
149
150 /**
151 * Returns the username value
152 *
153 * @return string
154 * @api
155 */
156 public function getUsername()
157 {
158 return $this->username;
159 }
160
161 /**
162 * Sets the password value
163 *
164 * @param string $password
165 * @return void
166 * @api
167 */
168 public function setPassword($password)
169 {
170 $this->password = $password;
171 }
172
173 /**
174 * Returns the password value
175 *
176 * @return string
177 * @api
178 */
179 public function getPassword()
180 {
181 return $this->password;
182 }
183
184 /**
185 * Sets the usergroups. Keep in mind that the property is called "usergroup"
186 * although it can hold several usergroups.
187 *
188 * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $usergroup
189 * @return void
190 * @api
191 */
192 public function setUsergroup(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $usergroup)
193 {
194 $this->usergroup = $usergroup;
195 }
196
197 /**
198 * Adds a usergroup to the frontend user
199 *
200 * @param \TYPO3\CMS\Extbase\Domain\Model\FrontendUserGroup $usergroup
201 * @return void
202 * @api
203 */
204 public function addUsergroup(\TYPO3\CMS\Extbase\Domain\Model\FrontendUserGroup $usergroup)
205 {
206 $this->usergroup->attach($usergroup);
207 }
208
209 /**
210 * Removes a usergroup from the frontend user
211 *
212 * @param \TYPO3\CMS\Extbase\Domain\Model\FrontendUserGroup $usergroup
213 * @return void
214 * @api
215 */
216 public function removeUsergroup(\TYPO3\CMS\Extbase\Domain\Model\FrontendUserGroup $usergroup)
217 {
218 $this->usergroup->detach($usergroup);
219 }
220
221 /**
222 * Returns the usergroups. Keep in mind that the property is called "usergroup"
223 * although it can hold several usergroups.
224 *
225 * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage An object storage containing the usergroup
226 * @api
227 */
228 public function getUsergroup()
229 {
230 return $this->usergroup;
231 }
232
233 /**
234 * Sets the name value
235 *
236 * @param string $name
237 * @return void
238 * @api
239 */
240 public function setName($name)
241 {
242 $this->name = $name;
243 }
244
245 /**
246 * Returns the name value
247 *
248 * @return string
249 * @api
250 */
251 public function getName()
252 {
253 return $this->name;
254 }
255
256 /**
257 * Sets the firstName value
258 *
259 * @param string $firstName
260 * @return void
261 * @api
262 */
263 public function setFirstName($firstName)
264 {
265 $this->firstName = $firstName;
266 }
267
268 /**
269 * Returns the firstName value
270 *
271 * @return string
272 * @api
273 */
274 public function getFirstName()
275 {
276 return $this->firstName;
277 }
278
279 /**
280 * Sets the middleName value
281 *
282 * @param string $middleName
283 * @return void
284 * @api
285 */
286 public function setMiddleName($middleName)
287 {
288 $this->middleName = $middleName;
289 }
290
291 /**
292 * Returns the middleName value
293 *
294 * @return string
295 * @api
296 */
297 public function getMiddleName()
298 {
299 return $this->middleName;
300 }
301
302 /**
303 * Sets the lastName value
304 *
305 * @param string $lastName
306 * @return void
307 * @api
308 */
309 public function setLastName($lastName)
310 {
311 $this->lastName = $lastName;
312 }
313
314 /**
315 * Returns the lastName value
316 *
317 * @return string
318 * @api
319 */
320 public function getLastName()
321 {
322 return $this->lastName;
323 }
324
325 /**
326 * Sets the address value
327 *
328 * @param string $address
329 * @return void
330 * @api
331 */
332 public function setAddress($address)
333 {
334 $this->address = $address;
335 }
336
337 /**
338 * Returns the address value
339 *
340 * @return string
341 * @api
342 */
343 public function getAddress()
344 {
345 return $this->address;
346 }
347
348 /**
349 * Sets the telephone value
350 *
351 * @param string $telephone
352 * @return void
353 * @api
354 */
355 public function setTelephone($telephone)
356 {
357 $this->telephone = $telephone;
358 }
359
360 /**
361 * Returns the telephone value
362 *
363 * @return string
364 * @api
365 */
366 public function getTelephone()
367 {
368 return $this->telephone;
369 }
370
371 /**
372 * Sets the fax value
373 *
374 * @param string $fax
375 * @return void
376 * @api
377 */
378 public function setFax($fax)
379 {
380 $this->fax = $fax;
381 }
382
383 /**
384 * Returns the fax value
385 *
386 * @return string
387 * @api
388 */
389 public function getFax()
390 {
391 return $this->fax;
392 }
393
394 /**
395 * Sets the email value
396 *
397 * @param string $email
398 * @return void
399 * @api
400 */
401 public function setEmail($email)
402 {
403 $this->email = $email;
404 }
405
406 /**
407 * Returns the email value
408 *
409 * @return string
410 * @api
411 */
412 public function getEmail()
413 {
414 return $this->email;
415 }
416
417 /**
418 * Sets the lockToDomain value
419 *
420 * @param string $lockToDomain
421 * @return void
422 * @api
423 */
424 public function setLockToDomain($lockToDomain)
425 {
426 $this->lockToDomain = $lockToDomain;
427 }
428
429 /**
430 * Returns the lockToDomain value
431 *
432 * @return string
433 * @api
434 */
435 public function getLockToDomain()
436 {
437 return $this->lockToDomain;
438 }
439
440 /**
441 * Sets the title value
442 *
443 * @param string $title
444 * @return void
445 * @api
446 */
447 public function setTitle($title)
448 {
449 $this->title = $title;
450 }
451
452 /**
453 * Returns the title value
454 *
455 * @return string
456 * @api
457 */
458 public function getTitle()
459 {
460 return $this->title;
461 }
462
463 /**
464 * Sets the zip value
465 *
466 * @param string $zip
467 * @return void
468 * @api
469 */
470 public function setZip($zip)
471 {
472 $this->zip = $zip;
473 }
474
475 /**
476 * Returns the zip value
477 *
478 * @return string
479 * @api
480 */
481 public function getZip()
482 {
483 return $this->zip;
484 }
485
486 /**
487 * Sets the city value
488 *
489 * @param string $city
490 * @return void
491 * @api
492 */
493 public function setCity($city)
494 {
495 $this->city = $city;
496 }
497
498 /**
499 * Returns the city value
500 *
501 * @return string
502 * @api
503 */
504 public function getCity()
505 {
506 return $this->city;
507 }
508
509 /**
510 * Sets the country value
511 *
512 * @param string $country
513 * @return void
514 * @api
515 */
516 public function setCountry($country)
517 {
518 $this->country = $country;
519 }
520
521 /**
522 * Returns the country value
523 *
524 * @return string
525 * @api
526 */
527 public function getCountry()
528 {
529 return $this->country;
530 }
531
532 /**
533 * Sets the www value
534 *
535 * @param string $www
536 * @return void
537 * @api
538 */
539 public function setWww($www)
540 {
541 $this->www = $www;
542 }
543
544 /**
545 * Returns the www value
546 *
547 * @return string
548 * @api
549 */
550 public function getWww()
551 {
552 return $this->www;
553 }
554
555 /**
556 * Sets the company value
557 *
558 * @param string $company
559 * @return void
560 * @api
561 */
562 public function setCompany($company)
563 {
564 $this->company = $company;
565 }
566
567 /**
568 * Returns the company value
569 *
570 * @return string
571 * @api
572 */
573 public function getCompany()
574 {
575 return $this->company;
576 }
577
578 /**
579 * Sets the image value
580 *
581 * @api
582 * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $image
583 */
584 public function setImage(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $image)
585 {
586 $this->image = $image;
587 }
588
589 /**
590 * Gets the image value
591 *
592 * @api
593 * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage
594 */
595 public function getImage()
596 {
597 return $this->image;
598 }
599
600 /**
601 * Sets the lastlogin value
602 *
603 * @param \DateTime $lastlogin
604 * @return void
605 * @api
606 */
607 public function setLastlogin(\DateTime $lastlogin)
608 {
609 $this->lastlogin = $lastlogin;
610 }
611
612 /**
613 * Returns the lastlogin value
614 *
615 * @return \DateTime
616 * @api
617 */
618 public function getLastlogin()
619 {
620 return $this->lastlogin;
621 }
622 }