| @@ 21-87 (lines=67) @@ | ||
| 18 | * @author Beñat Espiña <[email protected]> |
|
| 19 | * @author Gorka Laucirica <[email protected]> |
|
| 20 | */ |
|
| 21 | class SignUpUserCommand |
|
| 22 | { |
|
| 23 | /** |
|
| 24 | * The user email. |
|
| 25 | * |
|
| 26 | * @var string |
|
| 27 | */ |
|
| 28 | private $email; |
|
| 29 | ||
| 30 | /** |
|
| 31 | * The plain password. |
|
| 32 | * |
|
| 33 | * @var string |
|
| 34 | */ |
|
| 35 | private $plainPassword; |
|
| 36 | ||
| 37 | /** |
|
| 38 | * Array which contains the roles. |
|
| 39 | * |
|
| 40 | * @var array |
|
| 41 | */ |
|
| 42 | private $roles; |
|
| 43 | ||
| 44 | /** |
|
| 45 | * Constructor. |
|
| 46 | * |
|
| 47 | * @param string $anEmail The email |
|
| 48 | * @param string $aPlainPassword The plain password |
|
| 49 | * @param array $roles Array which contains the roles |
|
| 50 | */ |
|
| 51 | public function __construct($anEmail, $aPlainPassword, array $roles) |
|
| 52 | { |
|
| 53 | $this->email = $anEmail; |
|
| 54 | $this->plainPassword = $aPlainPassword; |
|
| 55 | $this->roles = $roles; |
|
| 56 | } |
|
| 57 | ||
| 58 | /** |
|
| 59 | * Gets the email. |
|
| 60 | * |
|
| 61 | * @return string |
|
| 62 | */ |
|
| 63 | public function email() |
|
| 64 | { |
|
| 65 | return $this->email; |
|
| 66 | } |
|
| 67 | ||
| 68 | /** |
|
| 69 | * Gets the user plain password. |
|
| 70 | * |
|
| 71 | * @return string |
|
| 72 | */ |
|
| 73 | public function password() |
|
| 74 | { |
|
| 75 | return $this->plainPassword; |
|
| 76 | } |
|
| 77 | ||
| 78 | /** |
|
| 79 | * Gets the roles. |
|
| 80 | * |
|
| 81 | * @return array |
|
| 82 | */ |
|
| 83 | public function roles() |
|
| 84 | { |
|
| 85 | return $this->roles; |
|
| 86 | } |
|
| 87 | } |
|
| 88 | ||
| @@ 21-87 (lines=67) @@ | ||
| 18 | * @author Beñat Espiña <[email protected]> |
|
| 19 | * @author Gorka Laucirica <[email protected]> |
|
| 20 | */ |
|
| 21 | class WithConfirmationSignUpUserCommand |
|
| 22 | { |
|
| 23 | /** |
|
| 24 | * The user email. |
|
| 25 | * |
|
| 26 | * @var string |
|
| 27 | */ |
|
| 28 | private $email; |
|
| 29 | ||
| 30 | /** |
|
| 31 | * The plain password. |
|
| 32 | * |
|
| 33 | * @var string |
|
| 34 | */ |
|
| 35 | private $plainPassword; |
|
| 36 | ||
| 37 | /** |
|
| 38 | * Array which contains the roles. |
|
| 39 | * |
|
| 40 | * @var array |
|
| 41 | */ |
|
| 42 | private $roles; |
|
| 43 | ||
| 44 | /** |
|
| 45 | * Constructor. |
|
| 46 | * |
|
| 47 | * @param string $anEmail The email |
|
| 48 | * @param string $aPlainPassword The plain password |
|
| 49 | * @param array $roles Array which contains the roles |
|
| 50 | */ |
|
| 51 | public function __construct($anEmail, $aPlainPassword, array $roles) |
|
| 52 | { |
|
| 53 | $this->email = $anEmail; |
|
| 54 | $this->plainPassword = $aPlainPassword; |
|
| 55 | $this->roles = $roles; |
|
| 56 | } |
|
| 57 | ||
| 58 | /** |
|
| 59 | * Gets the email. |
|
| 60 | * |
|
| 61 | * @return string |
|
| 62 | */ |
|
| 63 | public function email() |
|
| 64 | { |
|
| 65 | return $this->email; |
|
| 66 | } |
|
| 67 | ||
| 68 | /** |
|
| 69 | * Gets the user plain password. |
|
| 70 | * |
|
| 71 | * @return string |
|
| 72 | */ |
|
| 73 | public function password() |
|
| 74 | { |
|
| 75 | return $this->plainPassword; |
|
| 76 | } |
|
| 77 | ||
| 78 | /** |
|
| 79 | * Gets the roles. |
|
| 80 | * |
|
| 81 | * @return array |
|
| 82 | */ |
|
| 83 | public function roles() |
|
| 84 | { |
|
| 85 | return $this->roles; |
|
| 86 | } |
|
| 87 | } |
|
| 88 | ||