19 declare(strict_types=1);
30 private readonly PasswordAssistanceHash $hash,
40 $clone->creation_datetime = $creation_datetime;
48 $clone->expiration_datetime = $expiration_datetime;
53 public function hash(): PasswordAssistanceHash
65 return $this->creation_datetime;
70 return $this->expiration_datetime;
73 public function isExpired(ClockInterface $clock): bool
75 return $this->expiration_datetime !==
null && $this->expiration_datetime < $clock->now();
isExpired(ClockInterface $clock)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
withExpirationDateTime(?\DateTimeImmutable $expiration_datetime)
withCreationDateTime(?\DateTimeImmutable $creation_datetime)
__construct(private readonly PasswordAssistanceHash $hash, private readonly ObjectId $usr_id, private ?\DateTimeImmutable $creation_datetime=null, private ?\DateTimeImmutable $expiration_datetime=null)