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