individualData = new ArrayCollection(); } public function __toString() { return $this->name; } public function getName(): ?string { return $this->name; } public function setName(string $name): self { $this->name = $name; return $this; } public function getIndividualData(): ?Collection { return $this->individualData; } public function setIndividualData(?IndividualDataInterface $individualData): self { $this->individualData = $individualData; return $this; } /** * @return Collection|TerritoryInterface[] */ public function getTerritory(): Collection { return $this->territory; } public function addTerritory(TerritoryInterface $territory): self { if (!$this->territory->contains($territory)) { $this->territory[] = $territory; $territory->setIndividualData($this); } return $this; } public function removeTerritory(TerritoryInterface $territory): self { if ($this->territory->removeElement($territory)) { // set the owning side to null (unless already changed) if ($territory->getIndividualData() === $this) { $territory->setIndividualData(null); } } return $this; } }