Completed
Push — master ( edce3c...0ce30f )
by
unknown
15:59
created

FrontendUser::setPassword()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

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