20 private ?array $event,
22 private int $counterInvitations
29 if (is_null($this->event) || is_null($this->context))
35 $class = $this->getMap()[$this->type] ??
null;
41 return $class::createInstance($this->event, $this->context)
42 ->setCounterInvitations($this->counterInvitations);
45 private function getMap(): array
48 static::TYPE_REQUEST => SenderRequestInvitation::class,
49 static::TYPE_EDIT => SenderEditInvitation::class,
50 static::TYPE_CANCEL => SenderCancelInvitation::class,