src/Entity/ResetPasswordRequest.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Entity\SuperClass\BaseEntity;
  4. use App\Repository\ResetPasswordRequestRepository;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use SymfonyCasts\Bundle\ResetPassword\Model\ResetPasswordRequestInterface;
  7. use SymfonyCasts\Bundle\ResetPassword\Model\ResetPasswordRequestTrait;
  8. /**
  9. * @ORM\Entity(repositoryClass=ResetPasswordRequestRepository::class)
  10. */
  11. class ResetPasswordRequest extends BaseEntity implements ResetPasswordRequestInterface
  12. {
  13. use ResetPasswordRequestTrait;
  14. /**
  15. * @ORM\ManyToOne(targetEntity=User::class)
  16. * @ORM\JoinColumn(nullable=false)
  17. */
  18. private $user;
  19. public function __construct(object $user, \DateTimeInterface $expiresAt, string $selector, string $hashedToken)
  20. {
  21. $this->user = $user;
  22. $this->initialize($expiresAt, $selector, $hashedToken);
  23. }
  24. public function getUser(): object
  25. {
  26. return $this->user;
  27. }
  28. }