1 | <?php |
||
27 | trait Game |
||
28 | { |
||
29 | use ResultEntity; |
||
30 | |||
31 | //<editor-fold desc="Fields"> |
||
32 | |||
33 | /** |
||
34 | * @ORM\ManyToOne(targetEntity="\Tfboe\FmLib\Entity\MatchInterface", inversedBy="games") |
||
35 | * @var MatchInterface |
||
36 | */ |
||
37 | private $match; |
||
38 | |||
39 | /** |
||
40 | * @ORM\ManyToMany(targetEntity="\Tfboe\FmLib\Entity\Player", indexBy="id") |
||
41 | * @ORM\JoinTable(name="relation__game_playersA", |
||
42 | * joinColumns={@ORM\JoinColumn(name="game_id", referencedColumnName="id")}, |
||
43 | * inverseJoinColumns={@ORM\JoinColumn(name="player_id", referencedColumnName="player_id")}) |
||
44 | * @var Collection|Player |
||
45 | */ |
||
46 | private $playersA; |
||
47 | |||
48 | /** |
||
49 | * @ORM\ManyToMany(targetEntity="\Tfboe\FmLib\Entity\Player", indexBy="id") |
||
50 | * @ORM\JoinTable(name="relation__game_playersB", |
||
51 | * joinColumns={@ORM\JoinColumn(name="game_id", referencedColumnName="id")}, |
||
52 | * inverseJoinColumns={@ORM\JoinColumn(name="player_id", referencedColumnName="player_id")}) |
||
53 | * @var Collection|Player |
||
54 | */ |
||
55 | private $playersB; |
||
56 | |||
57 | /** |
||
58 | * @ORM\Column(type="integer") |
||
59 | * @var int |
||
60 | */ |
||
61 | private $gameNumber; |
||
62 | //</editor-fold desc="Fields"> |
||
63 | |||
64 | //<editor-fold desc="Public Methods"> |
||
65 | /** |
||
66 | * @inheritDoc |
||
67 | */ |
||
68 | public function getChildren(): Collection |
||
72 | |||
73 | /** |
||
74 | * @return int |
||
75 | */ |
||
76 | public function getGameNumber(): int |
||
80 | |||
81 | /** |
||
82 | * @inheritDoc |
||
83 | */ |
||
84 | public function getLevel(): int |
||
88 | |||
89 | /** |
||
90 | * @inheritDoc |
||
91 | */ |
||
92 | public function getLocalIdentifier() |
||
96 | |||
97 | /** |
||
98 | * @return MatchInterface |
||
99 | */ |
||
100 | public function getMatch(): MatchInterface |
||
104 | |||
105 | /** |
||
106 | * @inheritDoc |
||
107 | */ |
||
108 | public function getParent(): ?TournamentHierarchyInterface |
||
112 | |||
113 | /** |
||
114 | * @return Player[]|Collection |
||
115 | */ |
||
116 | public function getPlayersA() |
||
120 | |||
121 | /** |
||
122 | * @return Player[]|Collection |
||
123 | */ |
||
124 | public function getPlayersB() |
||
128 | |||
129 | /** |
||
130 | * Match constructor. |
||
131 | */ |
||
132 | public function init() |
||
137 | |||
138 | /** |
||
139 | * @param int $gameNumber |
||
140 | */ |
||
141 | public function setGameNumber(int $gameNumber) |
||
145 | |||
146 | /** |
||
147 | * @param MatchInterface $match |
||
148 | */ |
||
149 | public function setMatch(MatchInterface $match) |
||
157 | //</editor-fold desc="Public Methods"> |
||
158 | } |