godsdev / rate-limiter-interface
limits number of its calls per time
v0.1.1
2017-07-07 14:53 UTC
Requires (Dev)
- phpunit/phpunit: ^4|^5
This package is auto-updated.
Last update: 2024-10-24 23:37:37 UTC
README
Limits the number of requests per time.
- There are two parameters:
period
andrate
. - A request is a call of the
inc()
method. Aninc()
method begins to return false if number of requests perperiod
is higher than arate
. Unit ofperiod
MAY be second or any other time unit.
Test notes
test.sh
runs the PHPUnit tests.
test-coverage.sh
generates the PHPUnit coverage analysis to the temp folder.
If the php -v
command does not show the with Xdebug
line, note that for coverage testing you might need to manually edit the php.ini used by your PHP CLI in order to enable the
; XDEBUG Extension