Realisateur.php 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5. * Realisateur
  6. *
  7. * @ORM\Table(name="realisateur")
  8. * @ORM\Entity(repositoryClass="App\Repository\RealisateurRepository")
  9. */
  10. class Realisateur
  11. {
  12. /**
  13. * @var int
  14. *
  15. * @ORM\Column(name="id", type="integer")
  16. * @ORM\Id
  17. * @ORM\GeneratedValue(strategy="AUTO")
  18. */
  19. private $id;
  20. /**
  21. * @var string
  22. * @ORM\Column(name="nom_complet", type="string", length=191, unique=true)
  23. */
  24. private $nomComplet;
  25. /**
  26. * @ORM\ManyToMany(targetEntity="App\Entity\Film", mappedBy="realisateurs", cascade="persist")
  27. * @var \Doctrine\Common\Collections\Collection
  28. */
  29. private $films;
  30. /**
  31. * Get id
  32. *
  33. * @return int
  34. */
  35. public function getId()
  36. {
  37. return $this->id;
  38. }
  39. /**
  40. * Constructor
  41. */
  42. public function __construct()
  43. {
  44. $this->films = new \Doctrine\Common\Collections\ArrayCollection();
  45. }
  46. /**
  47. * Add film
  48. *
  49. * @param \App\Entity\Film $film
  50. *
  51. * @return Realisateur
  52. */
  53. public function addFilm(\App\Entity\Film $film)
  54. {
  55. $this->films[] = $film;
  56. return $this;
  57. }
  58. /**
  59. * Remove film
  60. *
  61. * @param \App\Entity\Film $film
  62. */
  63. public function removeFilm(\App\Entity\Film $film)
  64. {
  65. $this->films->removeElement($film);
  66. }
  67. /**
  68. * Get films
  69. *
  70. * @return \Doctrine\Common\Collections\Collection
  71. */
  72. public function getFilms()
  73. {
  74. return $this->films;
  75. }
  76. /**
  77. * Get nomComplet
  78. *
  79. * @return string
  80. */
  81. public function getNomComplet ()
  82. {
  83. return $this->nomComplet;
  84. }
  85. /**
  86. * Set nomComplet
  87. *
  88. * @param string $nomComplet
  89. *
  90. * @return Realisateur
  91. */
  92. public function setNomComplet($nom)
  93. {
  94. $this->nomComplet = $nom;
  95. return $this;
  96. }
  97. }