<?php
namespace App\Entity;
use App\Repository\MatiereRepository;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: MatiereRepository::class)]
class Matiere
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(length: 255)]
private ?string $libelle = null;
#[ORM\ManyToOne]
#[ORM\JoinColumn(nullable: false)]
private ?Filiere $refFilere = null;
public function getId(): ?int
{
return $this->id;
}
public function getLibelle(): ?string
{
return $this->libelle;
}
public function setLibelle(string $libelle): self
{
$this->libelle = $libelle;
return $this;
}
public function getRefFilere(): ?Filiere
{
return $this->refFilere;
}
public function setRefFilere(?Filiere $refFilere): self
{
$this->refFilere = $refFilere;
return $this;
}
public function __toString(): string
{
return $this->getLibelle()." (".$this->getRefFilere().")";
// TODO: Implement __toString() method.
}
}