1 | <?php |
||
14 | class UserProvider implements UserProviderInterface |
||
15 | { |
||
16 | /** |
||
17 | * @var UserRepository |
||
18 | */ |
||
19 | private $userRepository; |
||
20 | |||
21 | /** |
||
22 | * @var TranslatorInterface |
||
23 | */ |
||
24 | private $translator; |
||
25 | |||
26 | 6 | public function __construct(UserRepository $userRepository, TranslatorInterface $translator) |
|
31 | |||
32 | /** |
||
33 | * {@inheritdoc} |
||
34 | */ |
||
35 | 2 | public function loadUserByUsername($username) |
|
47 | |||
48 | /** |
||
49 | * {@inheritdoc} |
||
50 | */ |
||
51 | 1 | public function refreshUser(UserInterface $user): ?User |
|
71 | |||
72 | /** |
||
73 | * {@inheritdoc} |
||
74 | */ |
||
75 | 1 | public function supportsClass($class) |
|
80 | |||
81 | /** |
||
82 | * Finds a user by username. |
||
83 | * |
||
84 | * This method is meant to be an extension point for child classes. |
||
85 | * |
||
86 | * @param string $username |
||
87 | * |
||
88 | * @return User|null |
||
89 | */ |
||
90 | 2 | protected function findUser($username) |
|
94 | } |