src/Repository/ResetPasswordRequestRepository.php line 31

Open in your IDE?
  1. <?php
  2. /*
  3.  * This file is part of the Kreno package.
  4.  *
  5.  * (c) Valentin Van Meeuwen <contact@wikub.com>
  6.  *
  7.  * For the full copyright and license information, please view the LICENSE
  8.  * file that was distributed with this source code.
  9.  */
  10. namespace App\Repository;
  11. use App\Entity\ResetPasswordRequest;
  12. use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
  13. use Doctrine\Persistence\ManagerRegistry;
  14. use SymfonyCasts\Bundle\ResetPassword\Model\ResetPasswordRequestInterface;
  15. use SymfonyCasts\Bundle\ResetPassword\Persistence\Repository\ResetPasswordRequestRepositoryTrait;
  16. use SymfonyCasts\Bundle\ResetPassword\Persistence\ResetPasswordRequestRepositoryInterface;
  17. /**
  18.  * @method ResetPasswordRequest|null find($id, $lockMode = null, $lockVersion = null)
  19.  * @method ResetPasswordRequest|null findOneBy(array $criteria, array $orderBy = null)
  20.  * @method ResetPasswordRequest[]    findAll()
  21.  * @method ResetPasswordRequest[]    findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
  22.  */
  23. class ResetPasswordRequestRepository extends ServiceEntityRepository implements ResetPasswordRequestRepositoryInterface
  24. {
  25.     use ResetPasswordRequestRepositoryTrait;
  26.     public function __construct(ManagerRegistry $registry)
  27.     {
  28.         parent::__construct($registryResetPasswordRequest::class);
  29.     }
  30.     public function createResetPasswordRequest(object $user, \DateTimeInterface $expiresAtstring $selectorstring $hashedToken): ResetPasswordRequestInterface
  31.     {
  32.         return new ResetPasswordRequest($user$expiresAt$selector$hashedToken);
  33.     }
  34. }