SoccerMatch.php 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <?php
  2. class SoccerMatch
  3. {
  4. private string $gameDate;
  5. private Team $homeTeam;
  6. private Team $awayTeam;
  7. private int $matchId;
  8. private int $homeScore; // Actual Result home
  9. private int $awayScore; // Actual Result away
  10. private string $season;
  11. private string $homeTeamName;
  12. private string $awayTeamName;
  13. private float $odds1;
  14. private float $oddsX;
  15. private float $odds2;
  16. private $leagueName;
  17. public function __construct(
  18. $id,
  19. $homeTeam,
  20. $awayTeam,
  21. $odds1,
  22. $oddsX,
  23. $odds2,
  24. $homeScore,
  25. $awayScore,
  26. $gameDate,
  27. $season
  28. ) {
  29. $this->matchId = $id;
  30. $this->homeTeam = $homeTeam;
  31. $this->awayTeam = $awayTeam;
  32. $this->odds1 = $odds1;
  33. $this->oddsX = $oddsX;
  34. $this->odds2 = $odds2;
  35. $this->homeScore = $homeScore;
  36. $this->awayScore = $awayScore;
  37. $this->gameDate = $gameDate;
  38. $this->season = $season;
  39. $this->homeTeamName = $homeTeam->getTeamName();
  40. $this->awayTeamName = $awayTeam->getTeamName();
  41. }
  42. public function getHomeTeam()
  43. {
  44. return $this->homeTeam;
  45. }
  46. public function getGameDate()
  47. {
  48. return $this->gameDate;
  49. }
  50. public function getAwayTeam()
  51. {
  52. return $this->awayTeam;
  53. }
  54. public function getOdds1()
  55. {
  56. return $this->odds1;
  57. }
  58. public function getOddsX()
  59. {
  60. return $this->oddsX;
  61. }
  62. public function getOdds2()
  63. {
  64. return $this->odds2;
  65. }
  66. public function getLeagueName()
  67. {
  68. return $this->leagueName;
  69. }
  70. }