calendar; } public function getId(): ?int { return $this->id; } public function getStatus(): string { return $this->status; } public function getUser(): ?User { return $this->user; } /** * @internal use Calendar::addInvite instead */ public function setCalendar(?Calendar $calendar): void { $this->calendar = $calendar; } public function setStatus(string $status): self { $this->status = $status; return $this; } public function setUser(?User $user): self { if ($user instanceof User && $this->user instanceof User && $user !== $this->user) { throw new LogicException('Not allowed to associate an invite to a different user'); } $this->user = $user; return $this; } }