Comus Party 1.0.0
Application web de mini-jeux en ligne
Chargement...
Recherche...
Aucune correspondance
statistics.class.php
Aller à la documentation de ce fichier.
1<?php
9
10namespace ComusParty\Models;
11
17{
18
23 private ?string $playerUuid;
24
29 private ?int $gamesPlayed;
30
35 private ?int $gamesWon;
36
41 private ?int $gamesHosted;
42
50 public function __construct(
51 ?string $playerUuid = null,
52 ?int $gamesPlayed = null,
53 ?int $gamesWon = null,
54 ?int $gamesHosted = null
55 )
56 {
57 $this->playerUuid = $playerUuid;
58 $this->gamesPlayed = $gamesPlayed;
59 $this->gamesWon = $gamesWon;
60 $this->gamesHosted = $gamesHosted;
61 }
62
67 public function getPlayerUuid(): ?string
68 {
69 return $this->playerUuid;
70 }
71
76 public function setPlayerUuid(?string $playerUuid): void
77 {
78 $this->playerUuid = $playerUuid;
79 }
80
85 public function getGamesPlayed(): ?int
86 {
87 return $this->gamesPlayed;
88 }
89
94 public function setGamesPlayed(?int $gamesPlayed): void
95 {
96 $this->gamesPlayed = $gamesPlayed;
97 }
98
103 public function getGamesWon(): ?int
104 {
105 return $this->gamesWon;
106 }
107
112 public function setGamesWon(?int $gamesWon): void
113 {
114 $this->gamesWon = $gamesWon;
115 }
116
121 public function getGamesHosted(): ?int
122 {
123 return $this->gamesHosted;
124 }
125
130 public function setGamesHosted(?int $gamesHosted): void
131 {
132 $this->gamesHosted = $gamesHosted;
133 }
134
139 public function toArray(): array
140 {
141 return [
142 "gamesPlayed" => $this->gamesPlayed,
143 "gamesWon" => $this->gamesWon,
144 "gamesHosted" => $this->gamesHosted
145 ];
146 }
147}
setGamesPlayed(?int $gamesPlayed)
Modifie le nombre de parties jouées.
setGamesWon(?int $gamesWon)
Modifie le nombre de parties gagnées.
setPlayerUuid(?string $playerUuid)
Modifie l'UUID du joueur.
getPlayerUuid()
Retourne l'UUID du joueur.
getGamesHosted()
Retourne le nombre de parties hébergées.
__construct(?string $playerUuid=null, ?int $gamesPlayed=null, ?int $gamesWon=null, ?int $gamesHosted=null)
Le constructeur de la classe Statistics.
toArray()
Retourne un tableau associatif contenant les statistiques.
getGamesWon()
Retourne le nombre de parties gagnées.
setGamesHosted(?int $gamesHosted)
Modifie le nombre de parties hébergées.
getGamesPlayed()
Retourne le nombre de parties jouées.