1 | <?php |
||
13 | class Account implements AccountInterface, CollectionableInterface |
||
14 | { |
||
15 | use CollectionableTrait, SerializableTrait; |
||
16 | |||
17 | /** |
||
18 | * @var int |
||
19 | */ |
||
20 | protected $id; |
||
21 | |||
22 | /** |
||
23 | * @var int |
||
24 | */ |
||
25 | protected $ownerId; |
||
26 | |||
27 | /** |
||
28 | * @var string |
||
29 | */ |
||
30 | protected $username; |
||
31 | |||
32 | /** |
||
33 | * @var string |
||
34 | */ |
||
35 | protected $password; |
||
36 | |||
37 | /** |
||
38 | * @var string |
||
39 | */ |
||
40 | protected $salt; |
||
41 | |||
42 | /** |
||
43 | * @var array |
||
44 | */ |
||
45 | protected $roles; |
||
46 | |||
47 | /** |
||
48 | * @var array |
||
49 | */ |
||
50 | protected $applications; |
||
51 | |||
52 | /** |
||
53 | * Construct. |
||
54 | * |
||
55 | * @param string $rand |
||
56 | */ |
||
57 | public function __construct($rand = 'm@J0raOaUth') |
||
62 | |||
63 | /** |
||
64 | * @return int |
||
65 | */ |
||
66 | public function getId() |
||
70 | |||
71 | /** |
||
72 | * @see AccountInterface::getOwnerId() |
||
73 | */ |
||
74 | public function getOwnerId() |
||
78 | |||
79 | /** |
||
80 | * Define Account ownerId. |
||
81 | * |
||
82 | * @param int $ownerId |
||
83 | * |
||
84 | * @return self |
||
85 | */ |
||
86 | public function setOwnerId($ownerId) |
||
92 | |||
93 | /** |
||
94 | * @see UserInterface::getUsername() |
||
95 | */ |
||
96 | public function getUsername() |
||
100 | |||
101 | /** |
||
102 | * define Account username. |
||
103 | * |
||
104 | * @param string $username |
||
105 | * |
||
106 | * @return self |
||
107 | */ |
||
108 | public function setUsername($username) |
||
114 | |||
115 | /** |
||
116 | * @see UserInterface::getPassword() |
||
117 | */ |
||
118 | public function getPassword() |
||
122 | |||
123 | /** |
||
124 | * Define Account password. |
||
125 | * |
||
126 | * @param string $password |
||
127 | * |
||
128 | * @return self |
||
129 | */ |
||
130 | public function setPassword($password) |
||
136 | |||
137 | /** |
||
138 | * @see UserInterface::getSalt() |
||
139 | */ |
||
140 | public function getSalt() |
||
144 | |||
145 | /** |
||
146 | * @see UserInterface::getRoles() |
||
147 | * |
||
148 | * @codeCoverageIgnore |
||
149 | */ |
||
150 | public function getRoles() |
||
154 | |||
155 | /** |
||
156 | * @see UserInterface::eraseCredentials() |
||
157 | * |
||
158 | * @codeCoverageIgnore |
||
159 | */ |
||
160 | public function eraseCredentials() |
||
164 | |||
165 | /** |
||
166 | * @return array |
||
167 | */ |
||
168 | public function getApplications() |
||
172 | |||
173 | /** |
||
174 | * @param array $applications |
||
175 | */ |
||
176 | public function setApplications($applications) |
||
180 | |||
181 | public static function getScopes() |
||
185 | } |
||
186 |