person = $history->getPerson(); $this->center = $history->getCenter(); $this->startDate = $history->getStartDate(); $this->endDate = $history->getEndDate(); $this->id = $history->getId(); } public function getCenter(): Center { return $this->center; } public function getEndDate(): ?DateTimeImmutable { return $this->endDate; } /** * The id will be the same as the current @see{PersonCenterHistory::class}. */ public function getId(): int { return $this->id; } public function getPerson(): Person { return $this->person; } public function getStartDate(): DateTimeImmutable { return $this->startDate; } }