1 | <?php |
||
20 | class UserRepository extends ServiceEntityRepository implements UserLoaderInterface |
||
21 | { |
||
22 | 96 | public function __construct(RegistryInterface $registry) |
|
26 | |||
27 | /** |
||
28 | * @param string $username |
||
29 | * |
||
30 | * @throws \Doctrine\ORM\NonUniqueResultException |
||
31 | * |
||
32 | * @return User|null |
||
33 | */ |
||
34 | 8 | public function loadUserByUsername($username): ?User |
|
45 | |||
46 | /** |
||
47 | * @param string $email |
||
48 | * |
||
49 | * @throws NonUniqueResultException |
||
50 | * |
||
51 | * @return User|null |
||
52 | */ |
||
53 | 3 | public function loadUserByEmail(string $email): ?User |
|
61 | |||
62 | /** |
||
63 | * @param array $criteria |
||
64 | * |
||
65 | * @return mixed |
||
66 | */ |
||
67 | 3 | public function getUsersByCriteria(array $criteria) |
|
78 | |||
79 | /** |
||
80 | * I do not understand why getSingleScalarResult throws NoResultException but it does. |
||
81 | * |
||
82 | * @param array $criteria |
||
83 | * |
||
84 | * @return bool |
||
85 | */ |
||
86 | 4 | public function isUserExists(array $criteria): bool |
|
105 | } |
||
106 |