1 | <?php |
||
29 | trait RankingSystem |
||
30 | { |
||
31 | use SubClassData; |
||
32 | use TimestampableEntity; |
||
33 | use UUIDEntity; |
||
34 | use NameEntity; |
||
35 | |||
36 | //<editor-fold desc="Fields"> |
||
37 | |||
38 | /** |
||
39 | * @ORM\Column(type="string") |
||
40 | * |
||
41 | * @var string |
||
42 | */ |
||
43 | private $serviceName; |
||
44 | /** |
||
45 | * @ORM\Column(type="smallint", nullable=true) |
||
46 | * @var int|null |
||
47 | */ |
||
48 | private $defaultForLevel; |
||
49 | |||
50 | /** |
||
51 | * @ORM\Column(type="integer") |
||
52 | * @var int |
||
53 | */ |
||
54 | private $generationInterval; |
||
55 | |||
56 | /** |
||
57 | * @ORM\ManyToMany( |
||
58 | * targetEntity="\Tfboe\FmLib\Entity\Helpers\TournamentHierarchyEntity", |
||
59 | * mappedBy="rankingSystems", |
||
60 | * indexBy="id" |
||
61 | * ) |
||
62 | * @ORM\JoinTable(name="relation__tournament_ranking_systems") |
||
63 | * @var Collection|TournamentInterface[] |
||
64 | */ |
||
65 | private $hierarchyEntries; |
||
66 | /** |
||
67 | * @ORM\Column(type="datetime", nullable=true) |
||
68 | * @var \DateTime|null |
||
69 | */ |
||
70 | private $openSyncFrom; |
||
71 | |||
72 | /** |
||
73 | * @ORM\OneToMany(targetEntity="\Tfboe\FmLib\Entity\RankingSystemListInterface", mappedBy="rankingSystem", |
||
74 | * indexBy="id") |
||
75 | * @var Collection|RankingSystemListInterface[] |
||
76 | */ |
||
77 | private $lists; |
||
78 | //</editor-fold desc="Fields"> |
||
79 | |||
80 | //<editor-fold desc="Constructor"> |
||
81 | //</editor-fold desc="Constructor"> |
||
82 | |||
83 | //<editor-fold desc="Public Methods"> |
||
84 | /** |
||
85 | * @return int|null |
||
86 | */ |
||
87 | public function getDefaultForLevel(): ?int |
||
91 | |||
92 | /** |
||
93 | * @return int |
||
94 | */ |
||
95 | public function getGenerationInterval(): int |
||
99 | |||
100 | /** |
||
101 | * @return TournamentInterface[]|Collection |
||
102 | */ |
||
103 | public function getHierarchyEntries() |
||
107 | |||
108 | /** |
||
109 | * @return RankingSystemListInterface[]|Collection |
||
110 | */ |
||
111 | public function getLists(): Collection |
||
115 | |||
116 | /** |
||
117 | * @return \DateTime|null |
||
118 | */ |
||
119 | public function getOpenSyncFrom(): ?\DateTime |
||
123 | |||
124 | /** |
||
125 | * @return string |
||
126 | */ |
||
127 | public function getServiceName(): string |
||
131 | |||
132 | /** |
||
133 | * @param int|null $defaultForLevel |
||
134 | * @throws ValueNotValid |
||
135 | */ |
||
136 | public function setDefaultForLevel(?int $defaultForLevel) |
||
143 | |||
144 | /** |
||
145 | * @param int $generationInterval |
||
146 | * @throws \Tfboe\FmLib\Exceptions\ValueNotValid |
||
147 | */ |
||
148 | public function setGenerationInterval(int $generationInterval) |
||
153 | |||
154 | /** |
||
155 | * @param \DateTime|null $openSyncFrom |
||
156 | */ |
||
157 | public function setOpenSyncFrom(?\DateTime $openSyncFrom) |
||
161 | |||
162 | /** |
||
163 | * @param string $serviceName |
||
164 | */ |
||
165 | public function setServiceName(string $serviceName) |
||
169 | //</editor-fold desc="Public Methods"> |
||
170 | |||
171 | //<editor-fold desc="Protected Final Methods"> |
||
172 | /** |
||
173 | * RankingSystem init |
||
174 | * @param string[] $keys the keys of the subclass properties |
||
175 | */ |
||
176 | protected final function init(array $keys) |
||
185 | //</editor-fold desc="Protected Final Methods"> |
||
186 | } |