| 1 | <?php |
||
| 12 | class User implements UserInterface { |
||
| 13 | /** |
||
| 14 | * @var integer |
||
| 15 | * |
||
| 16 | * @ORM\Id |
||
| 17 | * @ORM\GeneratedValue(strategy="AUTO") |
||
| 18 | * @ORM\Column(type="integer") |
||
| 19 | **/ |
||
| 20 | protected $id; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @var string |
||
| 24 | * |
||
| 25 | * @ORM\Column(type="string", length=65) |
||
| 26 | **/ |
||
| 27 | protected $username; |
||
| 28 | /** @var string **/ |
||
| 29 | protected $password; |
||
| 30 | /** @var string **/ |
||
| 31 | protected $salt; |
||
| 32 | /** @var array **/ |
||
| 33 | protected $roles; |
||
| 34 | |||
| 35 | /** |
||
| 36 | * @param string $username |
||
| 37 | * @param string $password |
||
| 38 | * @param string $salt |
||
| 39 | * @param array $roles |
||
| 40 | */ |
||
| 41 | public function __construct($username = '', $password = '', $salt = '', $roles = []) { |
||
| 47 | |||
| 48 | /** |
||
| 49 | * @return int |
||
| 50 | */ |
||
| 51 | public function getId() { |
||
| 54 | |||
| 55 | /** |
||
| 56 | * @return string |
||
| 57 | */ |
||
| 58 | public function getUsername() { |
||
| 61 | |||
| 62 | /** |
||
| 63 | * @return string |
||
| 64 | */ |
||
| 65 | public function getPassword() { |
||
| 68 | |||
| 69 | /** |
||
| 70 | * @return string |
||
| 71 | */ |
||
| 72 | public function getSalt() { |
||
| 75 | |||
| 76 | /** |
||
| 77 | * @return array |
||
| 78 | */ |
||
| 79 | public function getRoles() { |
||
| 82 | |||
| 83 | /** |
||
| 84 | * @return boolean |
||
| 85 | */ |
||
| 86 | public function eraseCredentials() { |
||
| 89 | } |
||
| 90 |