*/ #[ORM\OneToMany(targetEntity: NameserverEntity::class, mappedBy: 'nameserver', orphanRemoval: true)] private Collection $nameserverEntities; #[ORM\Column(type: Types::SIMPLE_ARRAY, enumType: DomainStatus::class)] private array $status = []; public function __construct() { $this->nameserverEntities = new ArrayCollection(); } public function getHandle(): ?string { return $this->handle; } public function setHandle(string $handle): static { $this->handle = $handle; return $this; } public function getLdhName(): ?string { return $this->ldhName; } public function setLdhName(string $ldhName): static { $this->ldhName = $ldhName; return $this; } /** * @return Collection */ public function getNameserverEntities(): Collection { return $this->nameserverEntities; } public function addNameserverEntity(NameserverEntity $nameserverEntity): static { if (!$this->nameserverEntities->contains($nameserverEntity)) { $this->nameserverEntities->add($nameserverEntity); $nameserverEntity->setNameserver($this); } return $this; } public function removeNameserverEntity(NameserverEntity $nameserverEntity): static { if ($this->nameserverEntities->removeElement($nameserverEntity)) { // set the owning side to null (unless already changed) if ($nameserverEntity->getNameserver() === $this) { $nameserverEntity->setNameserver(null); } } return $this; } /** * @return DomainStatus[] */ public function getStatus(): array { return $this->status; } public function setStatus(array $status): static { $this->status = $status; return $this; } }