1 | <?php |
||
20 | class ParserBuilder implements BuilderInterface |
||
21 | { |
||
22 | /** @var DetailListOfLineParser */ |
||
23 | private $detailListOfLineParser; |
||
24 | |||
25 | /** @var InformationListOfLineParser */ |
||
26 | private $informationListOfLineParser; |
||
27 | |||
28 | /** @var null|Information */ |
||
29 | private $informationOrNull; |
||
30 | |||
31 | /** @var null|Detail[] */ |
||
32 | private $listOfDetailOrNull; |
||
33 | |||
34 | /** @var ScoreboardListOfLineParser */ |
||
35 | private $scoreboardListOfLineParser; |
||
36 | |||
37 | /** @var null|Scoreboard */ |
||
38 | private $scoreboardOrNull; |
||
39 | |||
40 | /** @var StatisticListOfLineParser */ |
||
41 | private $statisticListOfLineParser; |
||
42 | |||
43 | /** @var null|Statistic */ |
||
44 | private $statisticOrNull; |
||
45 | |||
46 | /** @var StorageInterface */ |
||
47 | private $storage; |
||
48 | |||
49 | /** |
||
50 | * ParserBuilder constructor. |
||
51 | * |
||
52 | * @param DetailListOfLineParser $detailListOfLineParser |
||
53 | * @param InformationListOfLineParser $informationListOfLineParser |
||
54 | * @param ScoreboardListOfLineParser $scoreboardListOfLineParser |
||
55 | * @param StatisticListOfLineParser $statisticListOfLineParser |
||
56 | */ |
||
57 | public function __construct( |
||
68 | |||
69 | /** |
||
70 | * @param StorageInterface $storage |
||
71 | */ |
||
72 | public function setStorageUpfront(StorageInterface $storage) |
||
76 | |||
77 | /** |
||
78 | * @throws RuntimeException |
||
79 | */ |
||
80 | public function build() |
||
125 | |||
126 | /** |
||
127 | * @return null|Information |
||
128 | */ |
||
129 | public function andGetInformationOrNullAfterwards() |
||
133 | |||
134 | /** |
||
135 | * @return null|Detail[] |
||
136 | */ |
||
137 | public function andGetListOfDetailOrNullAfterwards() |
||
141 | |||
142 | /** |
||
143 | * @return null|Scoreboard |
||
144 | */ |
||
145 | public function andGetScoreboardOrNullAfterwards() |
||
149 | |||
150 | /** |
||
151 | * @return null|Statistic |
||
152 | */ |
||
153 | public function andGetStatisticOrNullAfterwards() |
||
157 | } |
||
158 |