1 | <?php |
||
11 | class League |
||
12 | { |
||
13 | /** |
||
14 | * @var int |
||
15 | * |
||
16 | * @ORM\Id |
||
17 | * @ORM\GeneratedValue |
||
18 | * @ORM\Column(type="integer") |
||
19 | */ |
||
20 | private $id; |
||
21 | |||
22 | /** |
||
23 | * @var ArrayCollection|Team[] |
||
24 | * |
||
25 | * @ORM\OneToMany(targetEntity="Team", mappedBy="league") |
||
26 | */ |
||
27 | private $teams; |
||
28 | |||
29 | /** |
||
30 | * @var ArrayCollection|Fixture[] |
||
31 | * |
||
32 | * @ORM\OneToMany(targetEntity="Fixture", mappedBy="league") |
||
33 | */ |
||
34 | private $fixtures; |
||
35 | |||
36 | 6 | public function __construct() |
|
41 | |||
42 | /** |
||
43 | * @param Team $team |
||
44 | */ |
||
45 | 6 | public function addTeam(Team $team) |
|
49 | |||
50 | /** |
||
51 | * @return Team[] |
||
52 | */ |
||
53 | 5 | public function getStandings() |
|
69 | |||
70 | public function resetStandings() |
||
76 | |||
77 | /** |
||
78 | * @param int $season |
||
79 | */ |
||
80 | public function createFinalPositions($season) |
||
86 | |||
87 | /** |
||
88 | * @param int $position |
||
89 | * |
||
90 | * @return Team |
||
91 | */ |
||
92 | 3 | public function getTeamByPosition($position) |
|
98 | |||
99 | /** |
||
100 | * @param Team $team |
||
101 | * |
||
102 | * @return int |
||
103 | * |
||
104 | * @throws \Exception |
||
105 | */ |
||
106 | 1 | public function getPositionByTeam(Team $team) |
|
118 | |||
119 | /** |
||
120 | * @return ArrayCollection|Team[] |
||
121 | */ |
||
122 | public function getTeams() |
||
126 | |||
127 | /** |
||
128 | * @param Fixture $fixture |
||
129 | */ |
||
130 | 1 | public function addFixture(Fixture $fixture) |
|
134 | |||
135 | /** |
||
136 | * @return int |
||
137 | */ |
||
138 | public function getId() |
||
142 | |||
143 | /** |
||
144 | * @return ArrayCollection|Fixture[] |
||
145 | */ |
||
146 | public function getFixtures() |
||
150 | } |
||
151 |