1 | <?php |
||
10 | class LottoClient |
||
11 | { |
||
12 | /** |
||
13 | * Types of bets |
||
14 | */ |
||
15 | const DUZY_LOTEK = 'wynikiLotto'; |
||
16 | const MINI_LOTEK = 'wynikiLotto'; |
||
17 | const MULTI_LOTEK = 'wynikiMulti'; |
||
18 | const JOKER = 'wynikiJoker'; |
||
19 | const KASKADA = 'wynikiKaskada'; |
||
20 | |||
21 | /** |
||
22 | * @var SoapClient |
||
23 | */ |
||
24 | private $client; |
||
25 | |||
26 | /** |
||
27 | * @param SoapClient $client |
||
28 | */ |
||
29 | public function __construct(SoapClient $client) |
||
33 | |||
34 | /** |
||
35 | * Gets recently results. |
||
36 | * You can take from 1 to 10 recently results by specific type of bet. |
||
37 | * |
||
38 | * @param string $betType Bet type from constants. |
||
39 | * @param int $numberOfResults From 1 to 10. |
||
40 | * |
||
41 | * @return array |
||
42 | */ |
||
43 | public function getRecentlyResults($betType, $numberOfResults = 10) |
||
50 | |||
51 | /** |
||
52 | * Gets recently results by date. |
||
53 | * You can take from 1 to 10 recently results by specific date and type of bet. |
||
54 | * |
||
55 | * @param DateTime $date Date |
||
56 | * @param string $betType Bet type from constants. |
||
57 | * @param int $numberOfResults From 1 to 10. |
||
58 | * |
||
59 | * @return array |
||
60 | */ |
||
61 | public function getResultsByDate(DateTime $date, $betType, $numberOfResults = 10) |
||
67 | |||
68 | /** |
||
69 | * Gets results from lotto server |
||
70 | * |
||
71 | * @param DateTime $date |
||
72 | * @param $betType |
||
73 | * |
||
74 | * @return mixed |
||
75 | * |
||
76 | * @throws LottoClientException |
||
77 | */ |
||
78 | private function getResults(DateTime $date, $betType) |
||
92 | |||
93 | } |
||
94 |