Advertisement
Guest User

Untitled

a guest
Jul 10th, 2016
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.86 KB | None | 0 0
  1. <?php
  2.  
  3. namespace BlogBundle\Entity;
  4.  
  5. use Doctrine\ORM\Mapping as ORM;
  6.  
  7. /**
  8. * Users
  9. *
  10. * @ORM\Table(name="users")
  11. * @ORM\Entity
  12. */
  13. class Users implements \Symfony\Component\Security\Core\User\UserInterface
  14. {
  15. /**
  16. * @var string
  17. *
  18. * @ORM\Column(name="firstname", type="string", length=255, nullable=true)
  19. */
  20. private $firstname;
  21.  
  22. /**
  23. * @var string
  24. *
  25. * @ORM\Column(name="lastame", type="string", length=255, nullable=true)
  26. */
  27. private $lastame;
  28.  
  29. /**
  30. * @var string
  31. *
  32. * @ORM\Column(name="username", type="string", length=50, nullable=true)
  33. */
  34. private $username;
  35.  
  36. /**
  37. * @var string
  38. *
  39. * @ORM\Column(name="email", type="string", length=255, nullable=true)
  40. */
  41. private $email;
  42.  
  43. /**
  44. * @var string
  45. *
  46. * @ORM\Column(name="password", type="string", length=255, nullable=true)
  47. */
  48. private $password;
  49.  
  50. /**
  51. * @var \DateTime
  52. *
  53. * @ORM\Column(name="created", type="datetime", nullable=true)
  54. */
  55. private $created;
  56.  
  57. /**
  58. * @var \DateTime
  59. *
  60. * @ORM\Column(name="updated", type="datetime", nullable=true)
  61. */
  62. private $updated;
  63.  
  64. /**
  65. * @var integer
  66. *
  67. * @ORM\Column(name="isDeleted", type="integer", nullable=true)
  68. */
  69. private $isdeleted;
  70.  
  71. /**
  72. * @var integer
  73. *
  74. * @ORM\Column(name="isActive", type="integer", nullable=true)
  75. */
  76. private $isactive;
  77.  
  78. /**
  79. * @var integer
  80. *
  81. * @ORM\Column(name="id", type="integer")
  82. * @ORM\Id
  83. * @ORM\GeneratedValue(strategy="IDENTITY")
  84. */
  85. private $id;
  86.  
  87.  
  88.  
  89. /**
  90. * Set firstname
  91. *
  92. * @param string $firstname
  93. *
  94. * @return Users
  95. */
  96. public function setFirstname($firstname)
  97. {
  98. $this->firstname = $firstname;
  99.  
  100. return $this;
  101. }
  102.  
  103. /**
  104. * Get firstname
  105. *
  106. * @return string
  107. */
  108. public function getFirstname()
  109. {
  110. return $this->firstname;
  111. }
  112.  
  113. /**
  114. * Set lastame
  115. *
  116. * @param string $lastame
  117. *
  118. * @return Users
  119. */
  120. public function setLastame($lastame)
  121. {
  122. $this->lastame = $lastame;
  123.  
  124. return $this;
  125. }
  126.  
  127. /**
  128. * Get lastame
  129. *
  130. * @return string
  131. */
  132. public function getLastame()
  133. {
  134. return $this->lastame;
  135. }
  136.  
  137. /**
  138. * Set username
  139. *
  140. * @param string $username
  141. *
  142. * @return Users
  143. */
  144. public function setUsername($username)
  145. {
  146. $this->username = $username;
  147.  
  148. return $this;
  149. }
  150.  
  151. /**
  152. * Get username
  153. *
  154. * @return string
  155. */
  156. public function getUsername()
  157. {
  158. return $this->username;
  159. }
  160.  
  161. /**
  162. * Set email
  163. *
  164. * @param string $email
  165. *
  166. * @return Users
  167. */
  168. public function setEmail($email)
  169. {
  170. $this->email = $email;
  171.  
  172. return $this;
  173. }
  174.  
  175. /**
  176. * Get email
  177. *
  178. * @return string
  179. */
  180. public function getEmail()
  181. {
  182. return $this->email;
  183. }
  184.  
  185. /**
  186. * Set password
  187. *
  188. * @param string $password
  189. *
  190. * @return Users
  191. */
  192. public function setPassword($password)
  193. {
  194. $this->password = $password;
  195.  
  196. return $this;
  197. }
  198.  
  199. /**
  200. * Get password
  201. *
  202. * @return string
  203. */
  204. public function getPassword()
  205. {
  206. return $this->password;
  207. }
  208.  
  209. /**
  210. * Set created
  211. *
  212. * @param \DateTime $created
  213. *
  214. * @return Users
  215. */
  216. public function setCreated($created)
  217. {
  218. $this->created = $created;
  219.  
  220. return $this;
  221. }
  222.  
  223. /**
  224. * Get created
  225. *
  226. * @return \DateTime
  227. */
  228. public function getCreated()
  229. {
  230. return $this->created;
  231. }
  232.  
  233. /**
  234. * Set updated
  235. *
  236. * @param \DateTime $updated
  237. *
  238. * @return Users
  239. */
  240. public function setUpdated($updated)
  241. {
  242. $this->updated = $updated;
  243.  
  244. return $this;
  245. }
  246.  
  247. /**
  248. * Get updated
  249. *
  250. * @return \DateTime
  251. */
  252. public function getUpdated()
  253. {
  254. return $this->updated;
  255. }
  256.  
  257. /**
  258. * Set isdeleted
  259. *
  260. * @param integer $isdeleted
  261. *
  262. * @return Users
  263. */
  264. public function setIsdeleted($isdeleted)
  265. {
  266. $this->isdeleted = $isdeleted;
  267.  
  268. return $this;
  269. }
  270.  
  271. /**
  272. * Get isdeleted
  273. *
  274. * @return integer
  275. */
  276. public function getIsdeleted()
  277. {
  278. return $this->isdeleted;
  279. }
  280.  
  281. /**
  282. * Set isactive
  283. *
  284. * @param integer $isactive
  285. *
  286. * @return Users
  287. */
  288. public function setIsactive($isactive)
  289. {
  290. $this->isactive = $isactive;
  291.  
  292. return $this;
  293. }
  294.  
  295. /**
  296. * Get isactive
  297. *
  298. * @return integer
  299. */
  300. public function getIsactive()
  301. {
  302. return $this->isactive;
  303. }
  304.  
  305. /**
  306. * Get id
  307. *
  308. * @return integer
  309. */
  310. public function getId()
  311. {
  312. return $this->id;
  313. }
  314.  
  315. public function getSalt()
  316. {
  317. // The bcrypt algorithm doesn't require a separate salt.
  318. // You *may* need a real salt if you choose a different encoder.
  319. return null;
  320. }
  321.  
  322. /**
  323. * Returns the roles granted to the user.
  324. *
  325. * <code>
  326. * public function getRoles()
  327. * {
  328. * return array('ROLE_USER');
  329. * }
  330. * </code>
  331. *
  332. * Alternatively, the roles might be stored on a ``roles`` property,
  333. * and populated in any number of different ways when the user object
  334. * is created.
  335. *
  336. * @return (Role|string)[] The user roles
  337. */
  338. public function getRoles()
  339. {
  340. return array('ROLE_USER');
  341. }
  342.  
  343. /**
  344. * Removes sensitive data from the user.
  345. *
  346. * This is important if, at any given point, sensitive information like
  347. * the plain-text password is stored on this object.
  348. */
  349. public function eraseCredentials()
  350. {
  351. // TODO: Implement eraseCredentials() method.
  352. }
  353.  
  354. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement