assets
bin
config
migrations
public
src
Controller
Entity
.gitignore
Pages.php
Projects.php
Quotes.php
ResetPasswordRequest.php
User.php
Form
Repository
Security
Kernel.php
templates
tools
translations
.env
.eslintrc
.gitignore
.php-cs-fixer.cache
.php-cs-fixer.php
LICENSE
README.md
TODO
bootstrap.js
composer.json
composer.lock
controllers.json
docker-compose.override.yml
docker-compose.yml
package.json
rector.php
symfony.lock
webpack.config.js
yarn.lock
40 lines
1.0 KiB
PHP
40 lines
1.0 KiB
PHP
<?php
|
|
|
|
namespace App\Entity;
|
|
|
|
use App\Repository\ResetPasswordRequestRepository;
|
|
use Doctrine\ORM\Mapping as ORM;
|
|
use SymfonyCasts\Bundle\ResetPassword\Model\ResetPasswordRequestInterface;
|
|
use SymfonyCasts\Bundle\ResetPassword\Model\ResetPasswordRequestTrait;
|
|
|
|
#[ORM\Entity(repositoryClass: ResetPasswordRequestRepository::class)]
|
|
class ResetPasswordRequest implements ResetPasswordRequestInterface
|
|
{
|
|
use ResetPasswordRequestTrait;
|
|
|
|
#[ORM\Id]
|
|
#[ORM\GeneratedValue]
|
|
#[ORM\Column]
|
|
private ?int $id = null;
|
|
|
|
#[ORM\ManyToOne]
|
|
#[ORM\JoinColumn(nullable: false)]
|
|
private ?User $user = null;
|
|
|
|
public function __construct(User $user, \DateTimeInterface $expiresAt, string $selector, string $hashedToken)
|
|
{
|
|
$this->user = $user;
|
|
$this->initialize(expiresAt: $expiresAt, selector: $selector, hashedToken: $hashedToken);
|
|
}
|
|
|
|
public function getId(): ?int
|
|
{
|
|
return $this->id;
|
|
}
|
|
|
|
public function getUser(): object
|
|
{
|
|
return $this->user;
|
|
}
|
|
}
|