1 | <?php |
||
16 | class Utilisateur extends Entity implements JWTUserInterface, UtilisateurInterface |
||
17 | { |
||
18 | |||
19 | /** |
||
20 | * @var RoleUtilisateur |
||
21 | * |
||
22 | * @ORM\OneToOne(targetEntity="RoleUtilisateur", cascade={"persist"}) |
||
23 | * @ORM\JoinColumn(name="roles", referencedColumnName="id", nullable=true) |
||
24 | */ |
||
25 | protected $roles; |
||
26 | |||
27 | /** |
||
28 | * @var string |
||
29 | * |
||
30 | * @ORM\Column(name="salt", type="string", length=255, nullable=true) |
||
31 | */ |
||
32 | protected $salt; |
||
33 | |||
34 | /** |
||
35 | * @var string |
||
36 | * |
||
37 | * @ORM\Column(name="password", type="string", length=255) |
||
38 | */ |
||
39 | protected $password; |
||
40 | protected $plainPassword; |
||
41 | |||
42 | /** |
||
43 | * @var string |
||
44 | * |
||
45 | * @ORM\Column(name="email", type="string", length=255, nullable=false, unique=true) |
||
46 | */ |
||
47 | protected $email; |
||
48 | |||
49 | /** |
||
50 | * Utilisateur constructor. |
||
51 | * @param array $roles |
||
52 | * @param string $email |
||
53 | */ |
||
54 | public function __construct($email, $roles) |
||
59 | |||
60 | public static function createFromPayload($username, array $payload) |
||
67 | |||
68 | public function getRoles() |
||
77 | |||
78 | /** |
||
79 | * @param array $roles |
||
80 | * |
||
81 | * @return bool |
||
82 | */ |
||
83 | public function setRoles(array $roles) |
||
94 | |||
95 | public function getPassword() |
||
99 | |||
100 | /** |
||
101 | * @param string $password |
||
102 | */ |
||
103 | public function setPassword($password) |
||
107 | |||
108 | public function getSalt() |
||
112 | |||
113 | public function getUsername() |
||
117 | |||
118 | public function eraseCredentials() |
||
121 | |||
122 | |||
123 | /** |
||
124 | * @param string $email |
||
125 | */ |
||
126 | public function setEmail($email) |
||
130 | |||
131 | /** |
||
132 | * @return mixed |
||
133 | */ |
||
134 | public function getPlainPassword() |
||
138 | |||
139 | /** |
||
140 | * @param mixed $plainPassword |
||
141 | */ |
||
142 | public function setPlainPassword($plainPassword) |
||
146 | |||
147 | |||
148 | } |
||
|
|||
149 |
This check marks files that end in a newline character, i.e. an empy line.