files = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getAccessWish(): ?AccessWish { return $this->accessWish; } public function setAccessWish(?AccessWish $accessWish): self { $this->accessWish = $accessWish; return $this; } public function getPersonOwner(): ?Person { return $this->personOwner; } public function setPersonOwner(?Person $personOwner): self { $this->personOwner = $personOwner; return $this; } /** * @return Collection */ public function getFiles(): Collection { return $this->files; } public function addFile(File $file): self { if (!$this->files->contains($file)) { $this->files[] = $file; $file->setDocumentWish($this); } return $this; } public function removeFile(File $file): self { if ($this->files->removeElement($file)) { // set the owning side to null (unless already changed) if ($file->getDocumentWish() === $this) { $file->setDocumentWish(null); } } return $this; } }