Paaxio 1.0
Plateforme de streaming musical - SAE IUT Bayonne
Chargement...
Recherche...
Aucune correspondance
battle.class.php
Aller à la documentation de ce fichier.
1<?php
14enum StatutBattle: string {
15 case En_attente = 'en_attente';
16 case En_cours = 'en_cours';
17 case Terminee = 'terminee';
18 case Annulee = 'annulee';
20
29class Battle {
33 private int|null $idBattle;
34
38 private string|null $titreBattle;
39
43 private DateTime|null $dateDebutBattle;
44
48 private DateTime|null $dateFinBattle;
49
54
58 private string|null $emailCreateurBattle;
59
63 private string|null $emailParticipantBattle;
64
68 private int|null $idChansonCreateur;
69
73 private int|null $idChansonParticipant;
74
78 private ?Utilisateur $createur = null;
79
83 private ?Utilisateur $participant = null;
84
89
94
98 private bool $dejaVote = false;
99
104 public ?int $votesCreateur = null;
105
110 public ?int $votesParticipant = null;
111
124 public function __construct(?int $idBattle = null, ?string $titreBattle = null, ?DateTime $dateDebutBattle = null,
125 ?DateTime $dateFinBattle = null, ?StatutBattle $statutBattle = null,
126 ?string $emailCreateurBattle = null, ?string $emailParticipantBattle = null,
127 ?int $idChansonCreateur = null, ?int $idChansonParticipant = null)
128 {
129 $this->idBattle = $idBattle;
130 $this->titreBattle = $titreBattle;
131 $this->dateDebutBattle = $dateDebutBattle;
132 $this->dateFinBattle = $dateFinBattle;
133 $this->statutBattle = $statutBattle;
134 $this->emailCreateurBattle = $emailCreateurBattle;
135 $this->emailParticipantBattle = $emailParticipantBattle;
136 $this->idChansonCreateur = $idChansonCreateur;
137 $this->idChansonParticipant = $idChansonParticipant;
138 }
139
144 public function getIdBattle(): ?int
145 {
146 return $this->idBattle;
147 }
148
154 public function setIdBattle(?int $idBattle): void
155 {
156 $this->idBattle = $idBattle;
157 }
158
163 public function getTitreBattle(): ?string
164 {
165 return $this->titreBattle;
166 }
167
173 public function setTitreBattle(?string $titreBattle): void
174 {
175 $this->titreBattle = $titreBattle;
176 }
177
182 public function getDateDebutBattle(): ?DateTime
183 {
185 }
186
192 public function setDateDebutBattle(?DateTime $dateDebutBattle): void
193 {
194 $this->dateDebutBattle = $dateDebutBattle;
195 }
196
201 public function getDateFinBattle(): ?DateTime
202 {
204 }
205
211 public function setDateFinBattle(?DateTime $dateFinBattle): void
212 {
213 $this->dateFinBattle = $dateFinBattle;
214 }
215
220 public function getStatutBattle(): ?StatutBattle
221 {
222 return $this->statutBattle;
223 }
224
231 {
232 $this->statutBattle = $statutBattle;
233 }
234
239 public function getEmailCreateurBattle(): ?string
240 {
242 }
243
249 public function setEmailCreateurBattle(?string $emailCreateurBattle): void
250 {
251 $this->emailCreateurBattle = $emailCreateurBattle;
252 }
253
258 public function getEmailParticipantBattle(): ?string
259 {
261 }
262
269 {
270 $this->emailParticipantBattle = $emailParticipantBattle;
271 }
272
277 public function getIdChansonCreateur(): ?int { return $this->idChansonCreateur; }
278
284 public function setIdChansonCreateur(?int $id): void { $this->idChansonCreateur = $id; }
285
290 public function getIdChansonParticipant(): ?int { return $this->idChansonParticipant; }
291
297 public function setIdChansonParticipant(?int $id): void { $this->idChansonParticipant = $id; }
298
303 public function getCreateur(): ?Utilisateur { return $this->createur; }
304
310 public function setCreateur(?Utilisateur $u): void { $this->createur = $u; }
311
316 public function getParticipant(): ?Utilisateur { return $this->participant; }
317
323 public function setParticipant(?Utilisateur $u): void { $this->participant = $u; }
324
329 public function getChansonCreateurObj(): ?Chanson { return $this->chansonCreateurObj; }
330
336 public function setChansonCreateurObj(?Chanson $c): void { $this->chansonCreateurObj = $c; }
337
342 public function getChansonParticipantObj(): ?Chanson { return $this->chansonParticipantObj; }
343
349 public function setChansonParticipantObj(?Chanson $c): void { $this->chansonParticipantObj = $c; }
350
355 public function getDejaVote(): bool { return $this->dejaVote; }
356
362 public function setDejaVote(bool $dejaVote): void { $this->dejaVote = $dejaVote; }
363
368 public function getVotesCreateur(): ?int {
369 return $this->votesCreateur;
370 }
371
377 public function setVotesCreateur(?int $votes): void {
378 $this->votesCreateur = $votes;
379 }
380
385 public function getVotesParticipant(): ?int {
386 return $this->votesParticipant;
387 }
388
394 public function setVotesParticipant(?int $votes): void {
395 $this->votesParticipant = $votes;
396 }
397
398}
399?>
StatutBattle
Enumération des statuts possibles pour une battle.
@ Annulee
Classe représentant une battle musicale.
setEmailParticipantBattle(?string $emailParticipantBattle)
Setter pour emailParticipantBattle.
getParticipant()
Getter pour l'objet Utilisateur participant.
string null $emailCreateurBattle
DateTime null $dateFinBattle
getEmailCreateurBattle()
Getter pour emailCreateurBattle.
setEmailCreateurBattle(?string $emailCreateurBattle)
Setter pour emailCreateurBattle.
getTitreBattle()
Getter pour titreBattle.
setDateFinBattle(?DateTime $dateFinBattle)
Setter pour dateFinBattle.
getVotesParticipant()
Obtient le nombre de votes du participant.
getIdChansonParticipant()
Getter pour idChansonParticipant.
DateTime null $dateDebutBattle
getChansonCreateurObj()
Getter pour l'objet Chanson du créateur.
string null $titreBattle
string null $emailParticipantBattle
getEmailParticipantBattle()
Getter pour emailParticipantBattle.
getStatutBattle()
Getter pour statutBattle.
setIdChansonParticipant(?int $id)
Setter pour idChansonParticipant.
int null $idChansonParticipant
setChansonParticipantObj(?Chanson $c)
Setter pour l'objet Chanson du participant.
setVotesParticipant(?int $votes)
Définit le nombre de votes du participant.
getDejaVote()
Getter pour dejaVote.
setParticipant(?Utilisateur $u)
Setter pour l'objet Utilisateur participant.
setDejaVote(bool $dejaVote)
Setter pour dejaVote.
getVotesCreateur()
Obtient le nombre de votes du créateur.
getDateFinBattle()
Getter pour dateFinBattle.
setStatutBattle(?StatutBattle $statutBattle)
Setter pour statutBattle.
getIdChansonCreateur()
Getter pour idChansonCreateur.
setChansonCreateurObj(?Chanson $c)
Setter pour l'objet Chanson du créateur.
getDateDebutBattle()
Getter pour dateDebutBattle.
__construct(?int $idBattle=null, ?string $titreBattle=null, ?DateTime $dateDebutBattle=null, ?DateTime $dateFinBattle=null, ?StatutBattle $statutBattle=null, ?string $emailCreateurBattle=null, ?string $emailParticipantBattle=null, ?int $idChansonCreateur=null, ?int $idChansonParticipant=null)
Constructeur de la classe Battle.
bool $dejaVote
Chanson $chansonCreateurObj
setVotesCreateur(?int $votes)
Définit le nombre de votes du créateur.
Utilisateur $createur
setDateDebutBattle(?DateTime $dateDebutBattle)
Setter pour dateDebutBattle.
int $votesParticipant
Chanson $chansonParticipantObj
int null $idChansonCreateur
int $votesCreateur
setIdChansonCreateur(?int $id)
Setter pour idChansonCreateur.
setTitreBattle(?string $titreBattle)
Setter pour titreBattle.
getCreateur()
Getter pour l'objet Utilisateur créateur.
int null $idBattle
getIdBattle()
Getter pour idBattle.
StatutBattle null $statutBattle
Utilisateur $participant
getChansonParticipantObj()
Getter pour l'objet Chanson du participant.
setCreateur(?Utilisateur $u)
Setter pour l'objet Utilisateur créateur.
setIdBattle(?int $idBattle)
Setter pour idBattle.