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