‪TYPO3CMS  ‪main
ContextData.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
5 /*
6  * This file is part of the TYPO3 CMS project.
7  *
8  * It is free software; you can redistribute it and/or modify it under
9  * the terms of the GNU General Public License, either version 2
10  * of the License, or any later version.
11  *
12  * For the full copyright and license information, please read the
13  * LICENSE.txt file that was distributed with this source code.
14  *
15  * The TYPO3 project - inspiring people to share!
16  */
17 
19 
28 {
29  protected array ‪$data = [];
30 
31  public function ‪__construct(
32  string $loginMode = 'BE',
33  string $currentPasswordHash = '',
34  string $newUsername = '',
35  string $newUserFirstName = '',
36  string $newUserLastName = '',
37  string $newUserFullName = '',
38  ) {
39  $this->data['loginMode'] = $loginMode;
40  $this->data['currentPasswordHash'] = $currentPasswordHash;
41  $this->data['newUsername'] = $newUsername;
42  $this->data['newUserFirstName'] = $newUserFirstName;
43  $this->data['newUserLastName'] = $newUserLastName;
44  $this->data['newUserFullName'] = $newUserFullName;
45  }
46 
47  public function ‪getLoginMode(): string
48  {
49  return $this->‪getData('loginMode');
50  }
51 
52  public function ‪getCurrentPasswordHash(): string
53  {
54  return $this->‪getData('currentPasswordHash');
55  }
56 
57  public function ‪getNewUsername(): string
58  {
59  return $this->‪getData('newUsername');
60  }
61 
62  public function ‪getNewUserFirstName(): string
63  {
64  return $this->‪getData('newUserFirstName');
65  }
66 
67  public function ‪getNewUserLastName(): string
68  {
69  return $this->‪getData('newUserLastName');
70  }
71 
72  public function ‪getNewUserFullName(): string
73  {
74  return $this->‪getData('newUserFullName');
75  }
76 
77  public function ‪getData(string $key): string
78  {
79  return $this->data[$key] ?? '';
80  }
81 
82  public function ‪setData(string $key, string $value): void
83  {
84  $this->data[$key] = $value;
85  }
86 }
‪TYPO3\CMS\Core\PasswordPolicy\Validator\Dto\ContextData\getNewUsername
‪getNewUsername()
Definition: ContextData.php:57
‪TYPO3\CMS\Core\PasswordPolicy\Validator\Dto
Definition: ContextData.php:18
‪TYPO3\CMS\Core\PasswordPolicy\Validator\Dto\ContextData\getNewUserFullName
‪getNewUserFullName()
Definition: ContextData.php:72
‪TYPO3\CMS\Core\PasswordPolicy\Validator\Dto\ContextData\__construct
‪__construct(string $loginMode='BE', string $currentPasswordHash='', string $newUsername='', string $newUserFirstName='', string $newUserLastName='', string $newUserFullName='',)
Definition: ContextData.php:31
‪TYPO3\CMS\Core\PasswordPolicy\Validator\Dto\ContextData\setData
‪setData(string $key, string $value)
Definition: ContextData.php:82
‪TYPO3\CMS\Core\PasswordPolicy\Validator\Dto\ContextData\getNewUserLastName
‪getNewUserLastName()
Definition: ContextData.php:67
‪TYPO3\CMS\Core\PasswordPolicy\Validator\Dto\ContextData\getLoginMode
‪getLoginMode()
Definition: ContextData.php:47
‪TYPO3\CMS\Core\PasswordPolicy\Validator\Dto\ContextData\getData
‪getData(string $key)
Definition: ContextData.php:77
‪TYPO3\CMS\Core\PasswordPolicy\Validator\Dto\ContextData\getCurrentPasswordHash
‪getCurrentPasswordHash()
Definition: ContextData.php:52
‪TYPO3\CMS\Core\PasswordPolicy\Validator\Dto\ContextData\$data
‪array $data
Definition: ContextData.php:29
‪TYPO3\CMS\Core\PasswordPolicy\Validator\Dto\ContextData\getNewUserFirstName
‪getNewUserFirstName()
Definition: ContextData.php:62
‪TYPO3\CMS\Core\PasswordPolicy\Validator\Dto\ContextData
Definition: ContextData.php:28