1 | <?php |
||
10 | class Account implements AccountInterface |
||
11 | { |
||
12 | /** |
||
13 | * @var int |
||
14 | */ |
||
15 | protected $id; |
||
16 | |||
17 | /** |
||
18 | * @var int |
||
19 | */ |
||
20 | protected $ownerId; |
||
21 | |||
22 | /** |
||
23 | * @var string |
||
24 | */ |
||
25 | protected $username; |
||
26 | |||
27 | /** |
||
28 | * @var string |
||
29 | */ |
||
30 | protected $password; |
||
31 | |||
32 | /** |
||
33 | * @var string |
||
34 | */ |
||
35 | protected $salt; |
||
36 | |||
37 | /** |
||
38 | * @var array |
||
39 | */ |
||
40 | protected $roles; |
||
41 | |||
42 | /** |
||
43 | * Construct. |
||
44 | * |
||
45 | * @param string $rand |
||
46 | */ |
||
47 | public function __construct($rand = 'm@J0raOaUth') |
||
52 | |||
53 | /** |
||
54 | * @return int |
||
55 | */ |
||
56 | public function getId() |
||
60 | |||
61 | /** |
||
62 | * @see AccountInterface::getOwnerId() |
||
63 | */ |
||
64 | public function getOwnerId() |
||
68 | |||
69 | /** |
||
70 | * Define Account ownerId. |
||
71 | * |
||
72 | * @param int $ownerId |
||
73 | * |
||
74 | * @return self |
||
75 | */ |
||
76 | public function setOwnerId($ownerId) |
||
82 | |||
83 | /** |
||
84 | * @see UserInterface::getUsername() |
||
85 | */ |
||
86 | public function getUsername() |
||
90 | |||
91 | /** |
||
92 | * define Account username. |
||
93 | * |
||
94 | * @param string $username |
||
95 | * |
||
96 | * @return self |
||
97 | */ |
||
98 | public function setUsername($username) |
||
104 | |||
105 | /** |
||
106 | * @see UserInterface::getPassword() |
||
107 | */ |
||
108 | public function getPassword() |
||
112 | |||
113 | /** |
||
114 | * Define Account password. |
||
115 | * |
||
116 | * @param string $password |
||
117 | * |
||
118 | * @return self |
||
119 | */ |
||
120 | public function setPassword($password) |
||
126 | |||
127 | /** |
||
128 | * @see UserInterface::getSalt() |
||
129 | */ |
||
130 | public function getSalt() |
||
134 | |||
135 | /** |
||
136 | * @see UserInterface::getRoles() |
||
137 | * |
||
138 | * @codeCoverageIgnore |
||
139 | */ |
||
140 | public function getRoles() |
||
144 | |||
145 | /** |
||
146 | * @see UserInterface::eraseCredentials() |
||
147 | * |
||
148 | * @codeCoverageIgnore |
||
149 | */ |
||
150 | public function eraseCredentials() |
||
154 | } |
||
155 |