namespace ; /** * @extends ServiceEntityRepository<> */ class extends ServiceEntityRepository { public function __construct(ManagerRegistry $registry) { parent::__construct($registry, ::class); } /** * 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.', $user::class)); } $user->setPassword($newHashedPassword); $this->getEntityManager()->persist($user); $this->getEntityManager()->flush(); } // /** // * @return [] Returns an array of objects // */ // public function findByExampleField($value): array // { // 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() // ; // } }