src/Entity/ResetPasswordRequest.php line 13

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