[~TASK] Extbase (Domain): Changed property usergroups to usergroup (FrontendUser...
[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: $
31 * @scope prototype
32 * @entity
33 */
34 class Tx_Extbase_Domain_Model_FrontendUser extends Tx_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 Tx_Extbase_Persistence_ObjectStorage<Tx_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 $address = '';
60
61 /**
62 * @var string
63 */
64 protected $telephone = '';
65
66 /**
67 * @var string
68 */
69 protected $fax = '';
70
71 /**
72 * @var string
73 */
74 protected $email = '';
75
76 /**
77 * @var string
78 */
79 protected $lockToDomain = '';
80
81 /**
82 * @var string
83 */
84 protected $title = '';
85
86 /**
87 * @var string
88 */
89 protected $zip = '';
90
91 /**
92 * @var string
93 */
94 protected $city = '';
95
96 /**
97 * @var string
98 */
99 protected $country = '';
100
101 /**
102 * @var string
103 */
104 protected $www = '';
105
106 /**
107 * @var string
108 */
109 protected $company = '';
110
111 /**
112 * @var string
113 */
114 protected $image = '';
115
116 /**
117 * @var DateTime
118 */
119 protected $lastlogin = '';
120
121 /**
122 * @var DateTime
123 */
124 protected $isOnline = '';
125
126 /**
127 * Constructs a new Front-End User
128 *
129 * @api
130 */
131 public function __construct($username = '', $password = '') {
132 $this->username = $username;
133 $this->password = $password;
134 $this->usergroup = new Tx_Extbase_Persistence_ObjectStorage();
135 }
136
137 /**
138 * Sets the username value
139 *
140 * @param string $username
141 * @return void
142 * @api
143 */
144 public function setUsername($username) {
145 $this->username = $username;
146 }
147
148 /**
149 * Returns the username value
150 *
151 * @return string
152 * @api
153 */
154 public function getUsername() {
155 return $this->username;
156 }
157
158 /**
159 * Sets the password value
160 *
161 * @param string $password
162 * @return void
163 * @api
164 */
165 public function setPassword($password) {
166 $this->password = $password;
167 }
168
169 /**
170 * Returns the password value
171 *
172 * @return string
173 * @api
174 */
175 public function getPassword() {
176 return $this->password;
177 }
178
179 /**
180 * Sets the usergroups. Keep in mind that the property is called "usergroup"
181 * although it can hold several usergroups.
182 *
183 * @param Tx_Extbase_Persistence_ObjectStorage<Tx_Extbase_Domain_Model_FrontendUserGroup> $usergroup An object storage containing the usergroups to add
184 * @return void
185 * @api
186 */
187 public function setUsergroup(Tx_Extbase_Persistence_ObjectStorage $usergroup) {
188 $this->usergroup = $usergroup;
189 }
190
191 /**
192 * Adds a usergroup to the frontend user
193 *
194 * @param Tx_Extbase_Domain_Model_FrontendUserGroup $usergroup
195 * @return void
196 * @api
197 */
198 public function addUsergroup(Tx_Extbase_Domain_Model_FrontendUserGroup $usergroup) {
199 $this->usergroup->attach($usergroup);
200 }
201
202 /**
203 * Removes a usergroup from the frontend user
204 *
205 * @param Tx_Extbase_Domain_Model_FrontendUserGroup $usergroup
206 * @return void
207 * @api
208 */
209 public function removeUsergroup(Tx_Extbase_Domain_Model_FrontendUserGroup $usergroup) {
210 $this->usergroup->detach($usergroup);
211 }
212
213 /**
214 * Returns the usergroups. Keep in mind that the property is called "usergroup"
215 * although it can hold several usergroups.
216 *
217 * @return Tx_Extbase_Persistence_ObjectStorage An object storage containing the usergroup
218 * @api
219 */
220 public function getUsergroups() {
221 return $this->usergroup;
222 }
223
224 /**
225 * Sets the name value
226 *
227 * @param string $name
228 * @return void
229 * @api
230 */
231 public function setName($name) {
232 $this->name = $name;
233 }
234
235 /**
236 * Returns the name value
237 *
238 * @return string
239 * @api
240 */
241 public function getName() {
242 return $this->name;
243 }
244
245 /**
246 * Sets the address value
247 *
248 * @param string $address
249 * @return void
250 * @api
251 */
252 public function setAddress($address) {
253 $this->address = $address;
254 }
255
256 /**
257 * Returns the address value
258 *
259 * @return string
260 * @api
261 */
262 public function getAddress() {
263 return $this->address;
264 }
265
266 /**
267 * Sets the telephone value
268 *
269 * @param string $telephone
270 * @return void
271 * @api
272 */
273 public function setTelephone($telephone) {
274 $this->telephone = $telephone;
275 }
276
277 /**
278 * Returns the telephone value
279 *
280 * @return string
281 * @api
282 */
283 public function getTelephone() {
284 return $this->telephone;
285 }
286
287 /**
288 * Sets the fax value
289 *
290 * @param string $fax
291 * @return void
292 * @api
293 */
294 public function setFax($fax) {
295 $this->fax = $fax;
296 }
297
298 /**
299 * Returns the fax value
300 *
301 * @return string
302 * @api
303 */
304 public function getFax() {
305 return $this->fax;
306 }
307
308 /**
309 * Sets the email value
310 *
311 * @param string $email
312 * @return void
313 * @api
314 */
315 public function setEmail($email) {
316 $this->email = $email;
317 }
318
319 /**
320 * Returns the email value
321 *
322 * @return string
323 * @api
324 */
325 public function getEmail() {
326 return $this->email;
327 }
328
329 /**
330 * Sets the lockToDomain value
331 *
332 * @param string $lockToDomain
333 * @return void
334 * @api
335 */
336 public function setLockToDomain($lockToDomain) {
337 $this->lockToDomain = $lockToDomain;
338 }
339
340 /**
341 * Returns the lockToDomain value
342 *
343 * @return string
344 * @api
345 */
346 public function getLockToDomain() {
347 return $this->lockToDomain;
348 }
349
350 /**
351 * Sets the title value
352 *
353 * @param string $title
354 * @return void
355 * @api
356 */
357 public function setTitle($title) {
358 $this->title = $title;
359 }
360
361 /**
362 * Returns the title value
363 *
364 * @return string
365 * @api
366 */
367 public function getTitle() {
368 return $this->title;
369 }
370
371 /**
372 * Sets the zip value
373 *
374 * @param string $zip
375 * @return void
376 * @api
377 */
378 public function setZip($zip) {
379 $this->zip = $zip;
380 }
381
382 /**
383 * Returns the zip value
384 *
385 * @return string
386 * @api
387 */
388 public function getZip() {
389 return $this->zip;
390 }
391
392 /**
393 * Sets the city value
394 *
395 * @param string $city
396 * @return void
397 * @api
398 */
399 public function setCity($city) {
400 $this->city = $city;
401 }
402
403 /**
404 * Returns the city value
405 *
406 * @return string
407 * @api
408 */
409 public function getCity() {
410 return $this->city;
411 }
412
413 /**
414 * Sets the country value
415 *
416 * @param string $country
417 * @return void
418 * @api
419 */
420 public function setCountry($country) {
421 $this->country = $country;
422 }
423
424 /**
425 * Returns the country value
426 *
427 * @return string
428 * @api
429 */
430 public function getCountry() {
431 return $this->country;
432 }
433
434 /**
435 * Sets the www value
436 *
437 * @param string $www
438 * @return void
439 * @api
440 */
441 public function setWww($www) {
442 $this->www = $www;
443 }
444
445 /**
446 * Returns the www value
447 *
448 * @return string
449 * @api
450 */
451 public function getWww() {
452 return $this->www;
453 }
454
455 /**
456 * Sets the company value
457 *
458 * @param string $company
459 * @return void
460 * @api
461 */
462 public function setCompany($company) {
463 $this->company = $company;
464 }
465
466 /**
467 * Returns the company value
468 *
469 * @return string
470 * @api
471 */
472 public function getCompany() {
473 return $this->company;
474 }
475
476 /**
477 * Sets the image value
478 *
479 * @param string $image
480 * @return void
481 * @api
482 */
483 public function setImage($image) {
484 $this->image = $image;
485 }
486
487 /**
488 * Returns the image value
489 *
490 * @return string
491 * @api
492 */
493 public function getImage() {
494 return $this->image;
495 }
496
497 /**
498 * Sets the lastLogin value
499 *
500 * @param DateTime $lastLogin
501 * @return void
502 * @api
503 */
504 public function setLastLogin($lastLogin) {
505 $this->lastLogin = $lastLogin;
506 }
507
508 /**
509 * Returns the lastLogin value
510 *
511 * @return DateTime
512 * @api
513 */
514 public function getLastLogin() {
515 return $this->lastLogin;
516 }
517
518 /**
519 * Sets the isOnline value
520 *
521 * @param DateTime $isOnline
522 * @return void
523 * @api
524 */
525 public function setIsOnline($isOnline) {
526 $this->isOnline = $isOnline;
527 }
528
529 /**
530 * Returns the isOnline value
531 *
532 * @return DateTime
533 * @api
534 */
535 public function getIsOnline() {
536 return $this->isOnline;
537 }
538
539 }
540 ?>