1 | <?php |
||
12 | class UserProvider |
||
13 | { |
||
14 | /** |
||
15 | * @var SessionDataInterface |
||
16 | */ |
||
17 | private $sessionData; |
||
18 | |||
19 | /** |
||
20 | * @var UserService |
||
21 | */ |
||
22 | private $userService; |
||
23 | |||
24 | /** |
||
25 | * UserProvider constructor. |
||
26 | * |
||
27 | * @param SessionDataInterface $sessionData |
||
28 | * @param UserService $userService |
||
29 | */ |
||
30 | public function __construct(SessionDataInterface $sessionData, UserService $userService) |
||
35 | |||
36 | /** |
||
37 | * Fetches the user by its session. |
||
38 | * |
||
39 | * @return UserEntity|null User entity or null if there is no userId in session or the user is not found |
||
40 | */ |
||
41 | public function bySession() |
||
49 | } |
||
50 |