src/Repository/ResetPasswordRequestRepository.php line 23

Open in your IDE?
  1. <?php
  2. namespace App\Repository;
  3. use App\Entity\ResetPasswordRequest;
  4. use DateTimeInterface;
  5. use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
  6. use Doctrine\Persistence\ManagerRegistry;
  7. use SymfonyCasts\Bundle\ResetPassword\Model\ResetPasswordRequestInterface;
  8. use SymfonyCasts\Bundle\ResetPassword\Persistence\Repository\ResetPasswordRequestRepositoryTrait;
  9. use SymfonyCasts\Bundle\ResetPassword\Persistence\ResetPasswordRequestRepositoryInterface;
  10. /**
  11.  * @method ResetPasswordRequest|null find($id, $lockMode = null, $lockVersion = null)
  12.  * @method ResetPasswordRequest|null findOneBy(array $criteria, array $orderBy = null)
  13.  * @method ResetPasswordRequest[]    findAll()
  14.  * @method ResetPasswordRequest[]    findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
  15.  */
  16. class ResetPasswordRequestRepository extends ServiceEntityRepository implements ResetPasswordRequestRepositoryInterface
  17. {
  18.     use ResetPasswordRequestRepositoryTrait;
  19.     public function __construct(ManagerRegistry $registry)
  20.     {
  21.         parent::__construct($registryResetPasswordRequest::class);
  22.     }
  23.     public function createResetPasswordRequest(object $userDateTimeInterface $expiresAtstring $selectorstring $hashedToken): ResetPasswordRequestInterface
  24.     {
  25.         return new ResetPasswordRequest($user$expiresAt$selector$hashedToken);
  26.     }
  27. }