namespace ; use ; use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository; use Doctrine\ORM\OptimisticLockException; use Doctrine\ORM\ORMException; use ; getFullName(), 'Password')) ? sprintf("use %s;\n", $password_upgrade_user_interface->getFullName()) : null ?> getFullName(), '\UserInterface')) ? sprintf("use %s;\n", $password_upgrade_user_interface->getFullName()) : null ?> /** * @extends ServiceEntityRepository<> * * @method |null find($id, $lockMode = null, $lockVersion = null) * @method |null findOneBy(array $criteria, array $orderBy = null) * @method [] findAll() * @method [] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null) */ class extends ServiceEntityRepository { public function __construct(ManagerRegistry $registry) { parent::__construct($registry, ::class); } /** * @throws ORMException * @throws OptimisticLockException */ public function add( $entity, bool $flush = true): void { $this->_em->persist($entity); if ($flush) { $this->_em->flush(); } } /** * @throws ORMException * @throws OptimisticLockException */ public function remove( $entity, bool $flush = true): void { $this->_em->remove($entity); if ($flush) { $this->_em->flush(); } } /** * Used to upgrade (rehash) the user's password automatically over time. */ public function upgradePassword(getShortName()); ?>$user, string $newHashedPassword): void { if (!$user instanceof ) { throw new UnsupportedUserException(sprintf('Instances of "%s" are not supported.', \get_class($user))); } $user->setPassword($newHashedPassword); $this->_em->persist($user); $this->_em->flush(); } // /** // * @return [] Returns an array of objects // */ /* public function findByExampleField($value) { return $this->createQueryBuilder('') ->andWhere('.exampleField = :val') ->setParameter('val', $value) ->orderBy('.id', 'ASC') ->setMaxResults(10) ->getQuery() ->getResult() ; } */ /* public function findOneBySomeField($value): ? { return $this->createQueryBuilder('') ->andWhere('.exampleField = :val') ->setParameter('val', $value) ->getQuery() ->getOneOrNullResult() ; } */ }