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 | * @see NormalizableInterface::getScope() |
||
54 | */ |
||
55 | public static function getScopes() |
||
62 | |||
63 | /** |
||
64 | * Construct. |
||
65 | * |
||
66 | * @param string $rand |
||
67 | */ |
||
68 | public function __construct($rand = 'm@J0raOaUth') |
||
73 | |||
74 | /** |
||
75 | * @return int |
||
76 | */ |
||
77 | public function getId() |
||
81 | |||
82 | /** |
||
83 | * @see AccountInterface::getOwnerId() |
||
84 | */ |
||
85 | public function getOwnerId() |
||
89 | |||
90 | /** |
||
91 | * Define Account ownerId. |
||
92 | * |
||
93 | * @param int $ownerId |
||
94 | * |
||
95 | * @return self |
||
96 | */ |
||
97 | public function setOwnerId($ownerId) |
||
103 | |||
104 | /** |
||
105 | * @see UserInterface::getUsername() |
||
106 | */ |
||
107 | public function getUsername() |
||
111 | |||
112 | /** |
||
113 | * define Account username. |
||
114 | * |
||
115 | * @param string $username |
||
116 | * |
||
117 | * @return self |
||
118 | */ |
||
119 | public function setUsername($username) |
||
125 | |||
126 | /** |
||
127 | * @see UserInterface::getPassword() |
||
128 | */ |
||
129 | public function getPassword() |
||
133 | |||
134 | /** |
||
135 | * Define Account password. |
||
136 | * |
||
137 | * @param string $password |
||
138 | * |
||
139 | * @return self |
||
140 | */ |
||
141 | public function setPassword($password) |
||
147 | |||
148 | /** |
||
149 | * @see UserInterface::getSalt() |
||
150 | */ |
||
151 | public function getSalt() |
||
155 | |||
156 | /** |
||
157 | * @see UserInterface::getRoles() |
||
158 | * |
||
159 | * @codeCoverageIgnore |
||
160 | */ |
||
161 | public function getRoles() |
||
165 | |||
166 | /** |
||
167 | * @see UserInterface::eraseCredentials() |
||
168 | * |
||
169 | * @codeCoverageIgnore |
||
170 | */ |
||
171 | public function eraseCredentials() |
||
175 | |||
176 | /** |
||
177 | * @return array |
||
178 | */ |
||
179 | public function getApplications() |
||
183 | |||
184 | /** |
||
185 | * @param array $applications |
||
186 | */ |
||
187 | public function setApplications($applications) |
||
191 | } |
||
192 |