1 | <?php |
||
32 | abstract class AbstractWindowThrottler implements \Countable |
||
33 | { |
||
34 | /** |
||
35 | * @var ThrottlerCacheInterface |
||
36 | */ |
||
37 | protected $throttlerCache; |
||
38 | |||
39 | /** |
||
40 | * @var Data |
||
41 | */ |
||
42 | protected $data; |
||
43 | |||
44 | /** |
||
45 | * @var ThrottleSettingsInterface |
||
46 | */ |
||
47 | protected $settings; |
||
48 | |||
49 | /** |
||
50 | * @var int |
||
51 | */ |
||
52 | protected $counter; |
||
53 | |||
54 | /** |
||
55 | * @param ThrottlerCacheInterface $throttlerCache |
||
56 | * @param Data $data |
||
57 | * @param ThrottleSettingsInterface $settings |
||
58 | */ |
||
59 | public function __construct(ThrottlerCacheInterface $throttlerCache, Data $data, ThrottleSettingsInterface $settings) |
||
66 | |||
67 | /** |
||
68 | * @inheritdoc |
||
69 | */ |
||
70 | public function access(): bool |
||
78 | |||
79 | 36 | /** |
|
80 | 36 | * @inheritdoc |
|
81 | 36 | */ |
|
82 | 36 | public function clear(): ThrottlerInterface |
|
89 | |||
90 | 6 | /** |
|
91 | * @inheritdoc |
||
92 | 6 | */ |
|
93 | 6 | public function count() |
|
99 | |||
100 | /** |
||
101 | * @inheritdoc |
||
102 | 19 | */ |
|
103 | public function check(): bool |
||
108 | } |
||
109 |