src/Entity/Image.php line 11
<?phpnamespace App\Entity;use App\Repository\ImageRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: ImageRepository::class)]class Image{#[ORM\Id]#[ORM\GeneratedValue]#[ORM\Column]private ?int $id = null;#[ORM\Column(length: 255)]private ?string $nom = null;#[ORM\Column(length: 255)]private ?string $path = null;#[ORM\Column]private ?int $type = null;#[ORM\OneToMany(mappedBy: 'image', targetEntity: Client::class)]private Collection $clients;#[ORM\OneToMany(mappedBy: 'image', targetEntity: Historique::class)]private Collection $historiques;#[ORM\OneToMany(mappedBy: 'image', targetEntity: MetierFormation::class)]private Collection $metierFormations;#[ORM\OneToMany(mappedBy: 'image', targetEntity: MetierRh::class)]private Collection $metierRhs;public function __construct(){$this->clients = new ArrayCollection();$this->historiques = new ArrayCollection();$this->metierFormations = new ArrayCollection();$this->metierRhs = new ArrayCollection();}public function getId(): ?int{return $this->id;}public function getNom(): ?string{return $this->nom;}public function setNom(string $nom): self{$this->nom = $nom;return $this;}public function getPath(): ?string{return $this->path;}public function setPath(string $path): self{$this->path = $path;return $this;}public function getType(): ?int{return $this->type;}public function setType(int $type): self{$this->type = $type;return $this;}/*** @return Collection<int, Client>*/public function getClients(): Collection{return $this->clients;}public function addClient(Client $client): self{if (!$this->clients->contains($client)) {$this->clients->add($client);$client->setImage($this);}return $this;}public function removeClient(Client $client): self{if ($this->clients->removeElement($client)) {// set the owning side to null (unless already changed)if ($client->getImage() === $this) {$client->setImage(null);}}return $this;}/*** @return Collection<int, Historique>*/public function getHistoriques(): Collection{return $this->historiques;}public function addHistorique(Historique $historique): self{if (!$this->historiques->contains($historique)) {$this->historiques->add($historique);$historique->setImage($this);}return $this;}public function removeHistorique(Historique $historique): self{if ($this->historiques->removeElement($historique)) {// set the owning side to null (unless already changed)if ($historique->getImage() === $this) {$historique->setImage(null);}}return $this;}/*** @return Collection<int, MetierFormation>*/public function getMetierFormations(): Collection{return $this->metierFormations;}public function addMetierFormation(MetierFormation $metierFormation): self{if (!$this->metierFormations->contains($metierFormation)) {$this->metierFormations->add($metierFormation);$metierFormation->setImage($this);}return $this;}public function removeMetierFormation(MetierFormation $metierFormation): self{if ($this->metierFormations->removeElement($metierFormation)) {// set the owning side to null (unless already changed)if ($metierFormation->getImage() === $this) {$metierFormation->setImage(null);}}return $this;}/*** @return Collection<int, MetierRh>*/public function getMetierRhs(): Collection{return $this->metierRhs;}public function addMetierRh(MetierRh $metierRh): self{if (!$this->metierRhs->contains($metierRh)) {$this->metierRhs->add($metierRh);$metierRh->setImage($this);}return $this;}public function removeMetierRh(MetierRh $metierRh): self{if ($this->metierRhs->removeElement($metierRh)) {// set the owning side to null (unless already changed)if ($metierRh->getImage() === $this) {$metierRh->setImage(null);}}return $this;}}