1 | <?php |
||
22 | trait RateLimitTrait { |
||
23 | |||
24 | /** |
||
25 | * Limit. |
||
26 | * |
||
27 | * @var int |
||
28 | */ |
||
29 | private $limit; |
||
30 | |||
31 | /** |
||
32 | * Remaining. |
||
33 | * |
||
34 | * @var int |
||
35 | */ |
||
36 | private $remaining; |
||
37 | |||
38 | /** |
||
39 | * Reset. |
||
40 | * |
||
41 | * @var DateTime |
||
42 | */ |
||
43 | private $reset; |
||
44 | |||
45 | /** |
||
46 | * Get the limit. |
||
47 | * |
||
48 | * @return int Returns the limit. |
||
49 | */ |
||
50 | public function getLimit() { |
||
53 | |||
54 | /** |
||
55 | * Get the remaining. |
||
56 | * |
||
57 | * @return int Returns the remaining. |
||
58 | */ |
||
59 | public function getRemaining() { |
||
62 | |||
63 | /** |
||
64 | * Get the reset. |
||
65 | * |
||
66 | * @return DateTime Returns reset. |
||
67 | */ |
||
68 | public function getReset() { |
||
71 | |||
72 | /** |
||
73 | * Set the limit. |
||
74 | * |
||
75 | * @param int $limit The limit. |
||
76 | */ |
||
77 | public function setLimit($limit) { |
||
81 | |||
82 | /** |
||
83 | * Set the remaining. |
||
84 | * |
||
85 | * @param int $remaining The remaining. |
||
86 | */ |
||
87 | public function setRemaining($remaining) { |
||
91 | |||
92 | /** |
||
93 | * Set the reset. |
||
94 | * |
||
95 | * @param DateTime|null $reset The reset. |
||
96 | */ |
||
97 | public function setReset(DateTime $reset = null) { |
||
101 | } |
||
102 |