<?phpnamespace App\Entity;use App\Repository\AuxCountryRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;/** * @ORM\Entity(repositoryClass=AuxCountryRepository::class) */class AuxCountry{ /** * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") */ private $id; /** * @ORM\Column(type="string", length=50) */ private $name; /** * @ORM\Column(type="string", length=2) */ private $iso_code; /** * @ORM\OneToMany(targetEntity=AuxCity::class, mappedBy="aux_country") */ private $auxCities; /** * @ORM\Column(type="string", length=50) */ private $name_eng; public function __construct() { $this->auxCities = new ArrayCollection(); } 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; } public function getIsoCode(): ?string { return $this->iso_code; } public function setIsoCode(string $iso_code): self { $this->iso_code = $iso_code; return $this; } /** * @return Collection<int, AuxCity> */ public function getAuxCities(): Collection { return $this->auxCities; } public function addAuxCity(AuxCity $auxCity): self { if (!$this->auxCities->contains($auxCity)) { $this->auxCities[] = $auxCity; $auxCity->setAuxCountry($this); } return $this; } public function removeAuxCity(AuxCity $auxCity): self { if ($this->auxCities->removeElement($auxCity)) { // set the owning side to null (unless already changed) if ($auxCity->getAuxCountry() === $this) { $auxCity->setAuxCountry(null); } } return $this; } public function getNameEng(): ?string { return $this->name_eng; } public function setNameEng(string $name_eng): self { $this->name_eng = $name_eng; return $this; }}