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