| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- <?php
- class SoccerMatch
- {
- private string $gameDate;
- private Team $homeTeam;
- private Team $awayTeam;
- private int $matchId;
- private int $homeScore; // Actual Result home
- private int $awayScore; // Actual Result away
- private string $season;
- private string $homeTeamName;
- private string $awayTeamName;
- private float $odds1;
- private float $oddsX;
- private float $odds2;
- private $leagueName;
- public function __construct(
- $id,
- $homeTeam,
- $awayTeam,
- $odds1,
- $oddsX,
- $odds2,
- $homeScore,
- $awayScore,
- $gameDate,
- $season
- ) {
- $this->matchId = $id;
- $this->homeTeam = $homeTeam;
- $this->awayTeam = $awayTeam;
- $this->odds1 = $odds1;
- $this->oddsX = $oddsX;
- $this->odds2 = $odds2;
- $this->homeScore = $homeScore;
- $this->awayScore = $awayScore;
- $this->gameDate = $gameDate;
- $this->season = $season;
- $this->homeTeamName = $homeTeam->getTeamName();
- $this->awayTeamName = $awayTeam->getTeamName();
- }
- public function getHomeTeam()
- {
- return $this->homeTeam;
- }
- public function getGameDate()
- {
- return $this->gameDate;
- }
- public function getAwayTeam()
- {
- return $this->awayTeam;
- }
- public function getOdds1()
- {
- return $this->odds1;
- }
- public function getOddsX()
- {
- return $this->oddsX;
- }
- public function getOdds2()
- {
- return $this->odds2;
- }
- public function getLeagueName()
- {
- return $this->leagueName;
- }
- }
|