dojos = new ArrayCollection(); } /** * @return Collection */ public function getDojos(): Collection { return $this->dojos; } public function addDojo(Dojo $dojo): static { if (!$this->dojos->contains($dojo)) { $this->dojos->add($dojo); $dojo->setVillage($this); } return $this; } public function removeDojo(Dojo $dojo): static { if ($this->dojos->removeElement($dojo)) { // set the owning side to null (unless already changed) if ($dojo->getVillage() === $this) { $dojo->setVillage(null); } } return $this; } public function getPrefecture(): ?Prefecture { return $this->prefecture; } public function setPrefecture(?Prefecture $prefecture): static { $this->prefecture = $prefecture; return $this; } }