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