vendor/roothirsch/core-bundle/Entity/ResetPasswordRequest.php line 14

Open in your IDE?
  1. <?php
  2. namespace Roothirsch\CoreBundle\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Repository\ResetPasswordRequestRepository;
  5. use SymfonyCasts\Bundle\ResetPassword\Model\ResetPasswordRequestInterface;
  6. use SymfonyCasts\Bundle\ResetPassword\Model\ResetPasswordRequestTrait;
  7. /**
  8. * @ORM\Entity(repositoryClass=ResetPasswordRequestRepository::class)
  9. * @ORM\Table(name="reset_password_request")
  10. */
  11. class ResetPasswordRequest implements ResetPasswordRequestInterface
  12. {
  13. use ResetPasswordRequestTrait;
  14. /**
  15. * @ORM\Id
  16. * @ORM\GeneratedValue
  17. * @ORM\Column(type="integer")
  18. */
  19. private $id;
  20. /**
  21. * @ORM\ManyToOne(targetEntity=User::class)
  22. * @ORM\JoinColumn(nullable=false, onDelete="CASCADE")
  23. */
  24. private $user;
  25. public function __construct(object $user, \DateTimeInterface $expiresAt, string $selector, string $hashedToken)
  26. {
  27. $this->user = $user;
  28. $this->initialize($expiresAt, $selector, $hashedToken);
  29. }
  30. public function getId(): ?int
  31. {
  32. return $this->id;
  33. }
  34. public function getUser(): object
  35. {
  36. return $this->user;
  37. }
  38. }