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 | * @ORM\OneToMany(targetEntity="\Tfboe\FmLib\Entity\RankingSystemListInterface", mappedBy="rankingSystem", |
||
73 | * indexBy="id") |
||
74 | * @var Collection|RankingSystemListInterface[] |
||
75 | */ |
||
76 | private $lists; |
||
77 | //</editor-fold desc="Fields"> |
||
78 | |||
79 | //<editor-fold desc="Constructor"> |
||
80 | //</editor-fold desc="Constructor"> |
||
81 | |||
82 | //<editor-fold desc="Public Methods"> |
||
83 | /** |
||
84 | * @return int|null |
||
85 | */ |
||
86 | public function getDefaultForLevel(): ?int |
||
90 | |||
91 | /** |
||
92 | * @return int |
||
93 | */ |
||
94 | public function getGenerationInterval(): int |
||
98 | |||
99 | /** |
||
100 | * @return TournamentInterface[]|Collection |
||
101 | */ |
||
102 | public function getHierarchyEntries() |
||
106 | |||
107 | /** |
||
108 | * @return RankingSystemListInterface[]|Collection |
||
109 | */ |
||
110 | public function getLists(): Collection |
||
114 | |||
115 | /** |
||
116 | * @return \DateTime|null |
||
117 | */ |
||
118 | public function getOpenSyncFrom(): ?\DateTime |
||
122 | |||
123 | /** |
||
124 | * @return string |
||
125 | */ |
||
126 | public function getServiceName(): string |
||
130 | |||
131 | /** |
||
132 | * @param int|null $defaultForLevel |
||
133 | * @throws ValueNotValid |
||
134 | */ |
||
135 | public function setDefaultForLevel(?int $defaultForLevel) |
||
142 | |||
143 | /** |
||
144 | * @param int $generationInterval |
||
145 | * @throws \Tfboe\FmLib\Exceptions\ValueNotValid |
||
146 | */ |
||
147 | public function setGenerationInterval(int $generationInterval) |
||
152 | |||
153 | /** |
||
154 | * @param \DateTime|null $openSyncFrom |
||
155 | */ |
||
156 | public function setOpenSyncFrom(?\DateTime $openSyncFrom) |
||
160 | |||
161 | /** |
||
162 | * @param string $serviceName |
||
163 | */ |
||
164 | public function setServiceName(string $serviceName) |
||
168 | //</editor-fold desc="Public Methods"> |
||
169 | |||
170 | //<editor-fold desc="Protected Final Methods"> |
||
171 | /** |
||
172 | * RankingSystem init |
||
173 | * @param string[] $keys the keys of the subclass properties |
||
174 | */ |
||
175 | protected final function init(array $keys) |
||
184 | //</editor-fold desc="Protected Final Methods"> |
||
185 | } |