1 | <?php |
||
5 | class LimitedApiRate implements ApiRate |
||
6 | { |
||
7 | /** @var int */ |
||
8 | private $limit; |
||
9 | |||
10 | /** @var int */ |
||
11 | private $remaining; |
||
12 | |||
13 | /** @var \DateTimeInterface */ |
||
14 | private $reset; |
||
15 | |||
16 | /** |
||
17 | * LimitedApiRate constructor. |
||
18 | * |
||
19 | * @param int $limit |
||
20 | * @param int $remaining |
||
21 | * @param int $reset |
||
22 | */ |
||
23 | public function __construct( |
||
36 | |||
37 | /** |
||
38 | * @return int |
||
39 | */ |
||
40 | public function getLimit() |
||
44 | |||
45 | /** |
||
46 | * @return bool |
||
47 | */ |
||
48 | public function canMakeAnotherCall() |
||
52 | |||
53 | /** |
||
54 | * @return \DateTimeInterface |
||
55 | */ |
||
56 | public function nextWindow() |
||
60 | } |
||
61 |