1 | <?php |
||
9 | class NetworkManager |
||
10 | { |
||
11 | /** |
||
12 | * Network/api |
||
13 | * @var NetworkInterface |
||
14 | */ |
||
15 | protected $network; |
||
16 | |||
17 | /** |
||
18 | * Register the dependencies |
||
19 | * @param NetworkInterface $network |
||
20 | */ |
||
21 | public function __construct(NetworkInterface $network) |
||
25 | |||
26 | /** |
||
27 | * Set the network / api to use |
||
28 | * @param NetworkInterface $network |
||
29 | */ |
||
30 | public function setNetwork(NetworkInterface $network) |
||
34 | |||
35 | /** |
||
36 | * Get the network |
||
37 | * @return NetworkInterface |
||
38 | */ |
||
39 | public function getNetwork() |
||
43 | |||
44 | /** |
||
45 | * @param \DateTime $dateFrom |
||
46 | * @param \DateTime $dateTo |
||
47 | * @param int $merchantID |
||
48 | * @return array of Deal |
||
49 | */ |
||
50 | public function getDeals(\DateTime $dateFrom, \DateTime $dateTo, int $merchantID = 0) : array |
||
54 | |||
55 | /** |
||
56 | * @param \DateTime $dateFrom |
||
57 | * @param \DateTime $dateTo |
||
58 | * @param int $merchantID |
||
59 | * @return array of Transaction |
||
60 | */ |
||
61 | public function getSales(\DateTime $dateFrom, \DateTime $dateTo, int $merchantID = 0) : array |
||
65 | |||
66 | /** |
||
67 | * @param \DateTime $dateFrom |
||
68 | * @param \DateTime $dateTo |
||
69 | * @param int $merchantID |
||
70 | * @return array of Stat |
||
71 | */ |
||
72 | public function getStats(\DateTime $dateFrom, \DateTime $dateTo, int $merchantID = 0) : array |
||
76 | } |
||
77 |