interventions = new ArrayCollection(); $this->events = new ArrayCollection(); } public function __toString() { return $this->getName(); } public function getId(): ?int { return $this->id; } public function getName(): ?string { return $this->name; } public function setName(string $name): self { $this->name = $name; return $this; } /** * @return Collection */ public function getInterventions(): Collection { return $this->interventions; } public function addIntervention(Intervention $intervention): self { if (!$this->interventions->contains($intervention)) { $this->interventions[] = $intervention; $intervention->addSpeaker($this); } return $this; } public function removeIntervention(Intervention $intervention): self { if ($this->interventions->removeElement($intervention)) { $intervention->removeSpeaker($this); } return $this; } public function getCaldavHost(): ?string { return $this->caldavHost; } public function setCaldavHost(?string $caldavHost): self { $this->caldavHost = $caldavHost; return $this; } public function getCaldavUsername(): ?string { return $this->caldavUsername; } public function setCaldavUsername(?string $caldavUsername): self { $this->caldavUsername = $caldavUsername; return $this; } public function getCaldavPassword() { return $this->caldavPassword; } public function setCaldavPassword(?string $caldavPassword): self { $this->caldavPassword = $caldavPassword; return $this; } public function getCaldavCalendarUri(): ?string { return $this->caldavCalendarUri; } public function setCaldavCalendarUri(?string $caldavCalendarUri): self { $this->caldavCalendarUri = $caldavCalendarUri; return $this; } public function getEncryptedProperties(): array { return [ 'caldavPassword', ]; } /** * @return Collection */ public function getEvents(): Collection { return $this->events; } public function addEvent(Event $event): self { if (!$this->events->contains($event)) { $this->events[] = $event; $event->addSpeaker($this); } return $this; } public function removeEvent(Event $event): self { if ($this->events->removeElement($event)) { $event->removeSpeaker($this); } return $this; } }