Guest User

Untitled

a guest
Jan 10th, 2018
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.98 KB | None | 0 0
  1. <?php
  2.  
  3. namespace App\Entity;
  4.  
  5. use Doctrine\ORM\Mapping as ORM;
  6. use Symfony\Component\Validator\Constraints as Assert;
  7. use Symfony\Component\Security\Core\User\UserInterface;
  8.  
  9.  
  10. /**
  11. * @ORM\Entity(repositoryClass="App\Repository\WebuserRepository")
  12. */
  13. class Webuser implements UserInterface
  14. {
  15. /**
  16. * @ORM\Id
  17. * @ORM\Column(name="id",type="integer")
  18. * @ORM\GeneratedValue(strategy="AUTO")
  19. */
  20. private $id;
  21.  
  22.  
  23. /**
  24. * @ORM\Column(name="firstname",type="string",length=50)
  25. * @Assert\NotBlank()
  26. */
  27. private $firstname;
  28.  
  29.  
  30. /**
  31. * @ORM\Column(name="lastname",type="string",length=50)
  32. * @Assert\NotBlank()
  33. */
  34. private $lastname;
  35.  
  36.  
  37. /**
  38. * @ORM\Column(name="username",type="string",length=50, unique=true)
  39. * @Assert\NotBlank()
  40. */
  41. private $username;
  42.  
  43.  
  44. /**
  45. * @ORM\Column(name="email",type="string",length=50, unique=true)
  46. * @Assert\NotBlank()
  47. */
  48. private $email;
  49.  
  50.  
  51. /**
  52. * @Assert\Length(max=128)
  53. */
  54. private $inputPassword;
  55.  
  56. /**
  57. * @ORM\Column(name="password",type="string",length=50)
  58. */
  59. private $password;
  60.  
  61.  
  62. /**
  63. * @ORM\Column(name="dtregistration",type="datetime")
  64. */
  65. private $dtregistration;
  66.  
  67.  
  68. /**
  69. * @ORM\Column(name="role",type="string",length=30 )
  70. */
  71. private $role;
  72.  
  73.  
  74. //CONSTRUCTOR
  75.  
  76. public function __construct()
  77. {
  78. $this->dtregistration = new \DateTime();
  79. $this->role = "visiteur";
  80. }
  81.  
  82.  
  83. //GET AND SET METHODS
  84.  
  85. /**
  86. * @return mixed
  87. */
  88. public function getId()
  89. {
  90. return $this->id;
  91. }
  92.  
  93. /**
  94. * @param mixed $id
  95. */
  96. public function setId($id): void
  97. {
  98. $this->id = $id;
  99. }
  100.  
  101. /**
  102. * @return mixed
  103. */
  104. public function getFirstname()
  105. {
  106. return $this->firstname;
  107. }
  108.  
  109. /**
  110. * @param mixed $firstname
  111. */
  112. public function setFirstname($firstname): void
  113. {
  114. $this->firstname = $firstname;
  115. }
  116.  
  117. /**
  118. * @return mixed
  119. */
  120. public function getLastname()
  121. {
  122. return $this->lastname;
  123. }
  124.  
  125. /**
  126. * @param mixed $lastname
  127. */
  128. public function setLastname($lastname): void
  129. {
  130. $this->lastname = $lastname;
  131. }
  132.  
  133. /**
  134. * @return mixed
  135. */
  136. public function getUsername()
  137. {
  138. return $this->username;
  139. }
  140.  
  141. /**
  142. * @param mixed $username
  143. */
  144. public function setUsername($username): void
  145. {
  146. $this->username = $username;
  147. }
  148.  
  149. /**
  150. * @return mixed
  151. */
  152. public function getEmail()
  153. {
  154. return $this->email;
  155. }
  156.  
  157. /**
  158. * @param mixed $email
  159. */
  160. public function setEmail($email): void
  161. {
  162. $this->email = $email;
  163. }
  164.  
  165. /**
  166. * @return mixed
  167. */
  168. public function getInputPassword()
  169. {
  170. return $this->inputPassword;
  171. }
  172.  
  173. /**
  174. * @param mixed $inputPassword
  175. */
  176. public function setInputPassword($inputPassword)
  177. {
  178. $this->inputPassword = $inputPassword;
  179. }
  180.  
  181. /**
  182. * @return mixed
  183. */
  184. public function getPassword()
  185. {
  186. return $this->password;
  187. }
  188.  
  189. /**
  190. * @param mixed $password
  191. */
  192. public function setPassword($password): void
  193. {
  194. $this->password = $password;
  195. }
  196.  
  197. /**
  198. * @return mixed
  199. */
  200. public function getDtregistration()
  201. {
  202. return $this->dtregistration;
  203. }
  204.  
  205. /**
  206. * @param mixed $dtregistration
  207. */
  208. public function setDtregistration($dtregistration): void
  209. {
  210. $this->dtregistration = $dtregistration;
  211. }
  212.  
  213. /**
  214. * @return mixed
  215. */
  216. public function getRole()
  217. {
  218. return $this->role;
  219. }
  220.  
  221. /**
  222. * @param mixed $role
  223. */
  224. public function setRole($role): void
  225. {
  226. $this->role = $role;
  227. }
  228.  
  229. public function getSalt()
  230. {
  231. // TODO: Implement getSalt() method.
  232. }
  233. public function eraseCredentials()
  234. {
  235. // TODO: Implement eraseCredentials() method.
  236. }
  237.  
  238. public function getRoles()
  239. {
  240. // TODO: Implement getRoles() method.
  241. }
  242. }
Add Comment
Please, Sign In to add comment