1 | <?php |
||
14 | class Movie extends PonthubFile |
||
15 | { |
||
16 | /** |
||
17 | * Durée (en secondes) |
||
18 | * @ORM\Column(name="duration", type="integer", nullable=true) |
||
19 | * @JMS\Expose |
||
20 | * @Assert\Range(min = 0, max = 86400) |
||
21 | */ |
||
22 | protected $duration; |
||
23 | |||
24 | /** |
||
25 | * Année |
||
26 | * @ORM\Column(name="year", type="integer", nullable=true) |
||
27 | * @JMS\Expose |
||
28 | * @Assert\Range(min = 1000, max = 2050) |
||
29 | */ |
||
30 | protected $year; |
||
31 | |||
32 | /** |
||
33 | * Réalisateur |
||
34 | * @ORM\Column(name="director", type="string", nullable=true) |
||
35 | * @JMS\Expose |
||
36 | * @Assert\Type("string") |
||
37 | */ |
||
38 | protected $director; |
||
39 | |||
40 | /** |
||
41 | * Acteurs |
||
42 | * @ORM\ManyToMany(targetEntity="KI\PonthubBundle\Entity\Actor", cascade={"persist"}) |
||
43 | * @Assert\Valid() |
||
44 | */ |
||
45 | protected $actors; |
||
46 | |||
47 | /** |
||
48 | * @JMS\VirtualProperty() |
||
49 | */ |
||
50 | public function actorsList() |
||
58 | |||
59 | /** |
||
60 | * Score Metascore/Imdb (en %) |
||
61 | * @ORM\Column(name="rating", type="integer", nullable=true) |
||
62 | * @JMS\Expose |
||
63 | * @Assert\Range(min = 0, max = 100) |
||
64 | */ |
||
65 | protected $rating; |
||
66 | |||
67 | |||
68 | |||
69 | |||
70 | |||
71 | |||
72 | |||
73 | //===== GENERATED AUTOMATICALLY =====// |
||
74 | |||
75 | /** |
||
76 | * Constructor |
||
77 | */ |
||
78 | public function __construct() |
||
83 | |||
84 | /** |
||
85 | * Set duration |
||
86 | * |
||
87 | * @param integer $duration |
||
88 | * @return Movie |
||
89 | */ |
||
90 | public function setDuration($duration) |
||
96 | |||
97 | /** |
||
98 | * Get duration |
||
99 | * |
||
100 | * @return integer |
||
101 | */ |
||
102 | public function getDuration() |
||
106 | |||
107 | /** |
||
108 | * Set year |
||
109 | * |
||
110 | * @param integer $year |
||
111 | * @return Movie |
||
112 | */ |
||
113 | public function setYear($year) |
||
119 | |||
120 | /** |
||
121 | * Get year |
||
122 | * |
||
123 | * @return integer |
||
124 | */ |
||
125 | public function getYear() |
||
129 | |||
130 | /** |
||
131 | * Set director |
||
132 | * |
||
133 | * @param string $director |
||
134 | * @return Movie |
||
135 | */ |
||
136 | public function setDirector($director) |
||
142 | |||
143 | /** |
||
144 | * Get director |
||
145 | * |
||
146 | * @return string |
||
147 | */ |
||
148 | public function getDirector() |
||
152 | |||
153 | /** |
||
154 | * Set actors |
||
155 | * |
||
156 | * @param array $actors |
||
157 | * @return Movie |
||
158 | */ |
||
159 | public function setActors($actors) |
||
165 | |||
166 | /** |
||
167 | * Get actors |
||
168 | * |
||
169 | * @return array |
||
170 | */ |
||
171 | public function getActors() |
||
175 | |||
176 | /** |
||
177 | * Add actor |
||
178 | * |
||
179 | * @param \KI\PonthubBundle\Entity\Actor $actor |
||
180 | * @return Movie |
||
181 | */ |
||
182 | public function addActor(\KI\PonthubBundle\Entity\Actor $actor) |
||
188 | |||
189 | /** |
||
190 | * Remove actor |
||
191 | * |
||
192 | * @param \KI\PonthubBundle\Entity\Actor $actor |
||
193 | */ |
||
194 | public function removeActor(\KI\PonthubBundle\Entity\Actor $actor) |
||
198 | |||
199 | /** |
||
200 | * Set rating |
||
201 | * |
||
202 | * @param string $rating |
||
203 | * @return Movie |
||
204 | */ |
||
205 | public function setRating($rating) |
||
211 | |||
212 | /** |
||
213 | * Get rating |
||
214 | * |
||
215 | * @return integer |
||
216 | */ |
||
217 | public function getRating() |
||
221 | } |
||
222 |