├── .gitignore ├── .scrutinizer.yml ├── .travis.yml ├── LICENSE ├── README.md ├── composer.json ├── config └── config.php ├── phpunit.xml ├── src ├── Cache │ ├── Adapter │ │ ├── CacheAdapterInterface.php │ │ └── DesarrollaCacheAdapter.php │ ├── Exception │ │ ├── CacheException.php │ │ ├── DriverNotFoundException.php │ │ ├── InvalidConfigException.php │ │ └── ItemNotFoundException.php │ └── Factory │ │ ├── DesarrollaCacheFactory.php │ │ └── FactoryInterface.php ├── RateLimiter.php ├── RateLimiterInterface.php ├── Throttle │ ├── Entity │ │ └── Data.php │ ├── Exception │ │ └── InvalidDataTypeException.php │ ├── Factory │ │ ├── FactoryInterface.php │ │ ├── ThrottlerFactory.php │ │ └── TimeAwareThrottlerFactory.php │ ├── Hydrator │ │ ├── ArrayHydrator.php │ │ ├── DataHydratorInterface.php │ │ ├── FactoryInterface.php │ │ ├── HydratorFactory.php │ │ └── StringHydrator.php │ ├── Settings │ │ ├── AbstractWindowSettings.php │ │ ├── ElasticWindowSettings.php │ │ ├── FixedWindowSettings.php │ │ ├── LeakyBucketSettings.php │ │ ├── MovingWindowSettings.php │ │ ├── RetrialQueueSettings.php │ │ └── ThrottleSettingsInterface.php │ └── Throttler │ │ ├── AbstractWindowThrottler.php │ │ ├── ElasticWindowThrottler.php │ │ ├── FixedWindowThrottler.php │ │ ├── LeakyBucketThrottler.php │ │ ├── MovingWindowThrottler.php │ │ ├── RetriableThrottlerInterface.php │ │ ├── RetrialQueueThrottler.php │ │ └── ThrottlerInterface.php └── Time │ ├── PhpTimeAdapter.php │ └── TimeAdapterInterface.php └── tests ├── Cache ├── Adapter │ └── DesarrollaCacheAdapterTest.php └── Factory │ └── DesarrollaCacheFactoryTest.php ├── Functional ├── AbstractThrottlerTestCase.php ├── ElasticWindowTest.php ├── FixedWindowTest.php ├── LeakyBucketTest.php ├── MovingWindowTest.php └── RetrialQueueTest.php ├── RatelimiterTest.php └── Throttle ├── Entity └── DataTest.php ├── Factory ├── ThrottlerFactoryTest.php └── TimeAwareThrottlerFactoryTest.php ├── Hydrator ├── ArrayHydratorTest.php ├── HydratorFactoryTest.php └── StringHydratorTest.php ├── Settings ├── AbstractWindowSettingsTest.php ├── ElasticWindowSettingsTest.php ├── FixedWindowSettingsTest.php ├── LeakyBucketSettingsTest.php └── MovingWindowSettingsTest.php └── Throttler ├── AbstractWindowThrottlerTest.php ├── ElasticWindowThrottlerTest.php ├── FixedWindowThrottlerTest.php ├── LeakyBucketThrottlerTest.php ├── MovingWindowThrottlerTest.php └── RetrialQueueThrottlerTest.php /.gitignore: -------------------------------------------------------------------------------- 1 | vendor/ 2 | composer.lock 3 | -------------------------------------------------------------------------------- /.scrutinizer.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunspikes/php-ratelimiter/HEAD/.scrutinizer.yml -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunspikes/php-ratelimiter/HEAD/.travis.yml -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunspikes/php-ratelimiter/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunspikes/php-ratelimiter/HEAD/README.md -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunspikes/php-ratelimiter/HEAD/composer.json -------------------------------------------------------------------------------- /config/config.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunspikes/php-ratelimiter/HEAD/config/config.php -------------------------------------------------------------------------------- /phpunit.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunspikes/php-ratelimiter/HEAD/phpunit.xml -------------------------------------------------------------------------------- /src/Cache/Adapter/CacheAdapterInterface.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunspikes/php-ratelimiter/HEAD/src/Cache/Adapter/CacheAdapterInterface.php -------------------------------------------------------------------------------- /src/Cache/Adapter/DesarrollaCacheAdapter.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunspikes/php-ratelimiter/HEAD/src/Cache/Adapter/DesarrollaCacheAdapter.php -------------------------------------------------------------------------------- /src/Cache/Exception/CacheException.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunspikes/php-ratelimiter/HEAD/src/Cache/Exception/CacheException.php -------------------------------------------------------------------------------- /src/Cache/Exception/DriverNotFoundException.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunspikes/php-ratelimiter/HEAD/src/Cache/Exception/DriverNotFoundException.php -------------------------------------------------------------------------------- /src/Cache/Exception/InvalidConfigException.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunspikes/php-ratelimiter/HEAD/src/Cache/Exception/InvalidConfigException.php -------------------------------------------------------------------------------- /src/Cache/Exception/ItemNotFoundException.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunspikes/php-ratelimiter/HEAD/src/Cache/Exception/ItemNotFoundException.php -------------------------------------------------------------------------------- /src/Cache/Factory/DesarrollaCacheFactory.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunspikes/php-ratelimiter/HEAD/src/Cache/Factory/DesarrollaCacheFactory.php -------------------------------------------------------------------------------- /src/Cache/Factory/FactoryInterface.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunspikes/php-ratelimiter/HEAD/src/Cache/Factory/FactoryInterface.php -------------------------------------------------------------------------------- /src/RateLimiter.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunspikes/php-ratelimiter/HEAD/src/RateLimiter.php -------------------------------------------------------------------------------- /src/RateLimiterInterface.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunspikes/php-ratelimiter/HEAD/src/RateLimiterInterface.php -------------------------------------------------------------------------------- /src/Throttle/Entity/Data.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunspikes/php-ratelimiter/HEAD/src/Throttle/Entity/Data.php -------------------------------------------------------------------------------- /src/Throttle/Exception/InvalidDataTypeException.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunspikes/php-ratelimiter/HEAD/src/Throttle/Exception/InvalidDataTypeException.php -------------------------------------------------------------------------------- /src/Throttle/Factory/FactoryInterface.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunspikes/php-ratelimiter/HEAD/src/Throttle/Factory/FactoryInterface.php -------------------------------------------------------------------------------- /src/Throttle/Factory/ThrottlerFactory.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunspikes/php-ratelimiter/HEAD/src/Throttle/Factory/ThrottlerFactory.php -------------------------------------------------------------------------------- /src/Throttle/Factory/TimeAwareThrottlerFactory.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunspikes/php-ratelimiter/HEAD/src/Throttle/Factory/TimeAwareThrottlerFactory.php -------------------------------------------------------------------------------- /src/Throttle/Hydrator/ArrayHydrator.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunspikes/php-ratelimiter/HEAD/src/Throttle/Hydrator/ArrayHydrator.php -------------------------------------------------------------------------------- /src/Throttle/Hydrator/DataHydratorInterface.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunspikes/php-ratelimiter/HEAD/src/Throttle/Hydrator/DataHydratorInterface.php -------------------------------------------------------------------------------- /src/Throttle/Hydrator/FactoryInterface.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunspikes/php-ratelimiter/HEAD/src/Throttle/Hydrator/FactoryInterface.php -------------------------------------------------------------------------------- /src/Throttle/Hydrator/HydratorFactory.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunspikes/php-ratelimiter/HEAD/src/Throttle/Hydrator/HydratorFactory.php -------------------------------------------------------------------------------- /src/Throttle/Hydrator/StringHydrator.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunspikes/php-ratelimiter/HEAD/src/Throttle/Hydrator/StringHydrator.php -------------------------------------------------------------------------------- /src/Throttle/Settings/AbstractWindowSettings.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunspikes/php-ratelimiter/HEAD/src/Throttle/Settings/AbstractWindowSettings.php -------------------------------------------------------------------------------- /src/Throttle/Settings/ElasticWindowSettings.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunspikes/php-ratelimiter/HEAD/src/Throttle/Settings/ElasticWindowSettings.php -------------------------------------------------------------------------------- /src/Throttle/Settings/FixedWindowSettings.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunspikes/php-ratelimiter/HEAD/src/Throttle/Settings/FixedWindowSettings.php -------------------------------------------------------------------------------- /src/Throttle/Settings/LeakyBucketSettings.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunspikes/php-ratelimiter/HEAD/src/Throttle/Settings/LeakyBucketSettings.php -------------------------------------------------------------------------------- /src/Throttle/Settings/MovingWindowSettings.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunspikes/php-ratelimiter/HEAD/src/Throttle/Settings/MovingWindowSettings.php -------------------------------------------------------------------------------- /src/Throttle/Settings/RetrialQueueSettings.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunspikes/php-ratelimiter/HEAD/src/Throttle/Settings/RetrialQueueSettings.php -------------------------------------------------------------------------------- /src/Throttle/Settings/ThrottleSettingsInterface.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunspikes/php-ratelimiter/HEAD/src/Throttle/Settings/ThrottleSettingsInterface.php -------------------------------------------------------------------------------- /src/Throttle/Throttler/AbstractWindowThrottler.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunspikes/php-ratelimiter/HEAD/src/Throttle/Throttler/AbstractWindowThrottler.php -------------------------------------------------------------------------------- /src/Throttle/Throttler/ElasticWindowThrottler.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunspikes/php-ratelimiter/HEAD/src/Throttle/Throttler/ElasticWindowThrottler.php -------------------------------------------------------------------------------- /src/Throttle/Throttler/FixedWindowThrottler.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunspikes/php-ratelimiter/HEAD/src/Throttle/Throttler/FixedWindowThrottler.php -------------------------------------------------------------------------------- /src/Throttle/Throttler/LeakyBucketThrottler.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunspikes/php-ratelimiter/HEAD/src/Throttle/Throttler/LeakyBucketThrottler.php -------------------------------------------------------------------------------- /src/Throttle/Throttler/MovingWindowThrottler.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunspikes/php-ratelimiter/HEAD/src/Throttle/Throttler/MovingWindowThrottler.php -------------------------------------------------------------------------------- /src/Throttle/Throttler/RetriableThrottlerInterface.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunspikes/php-ratelimiter/HEAD/src/Throttle/Throttler/RetriableThrottlerInterface.php -------------------------------------------------------------------------------- /src/Throttle/Throttler/RetrialQueueThrottler.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunspikes/php-ratelimiter/HEAD/src/Throttle/Throttler/RetrialQueueThrottler.php -------------------------------------------------------------------------------- /src/Throttle/Throttler/ThrottlerInterface.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunspikes/php-ratelimiter/HEAD/src/Throttle/Throttler/ThrottlerInterface.php -------------------------------------------------------------------------------- /src/Time/PhpTimeAdapter.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunspikes/php-ratelimiter/HEAD/src/Time/PhpTimeAdapter.php -------------------------------------------------------------------------------- /src/Time/TimeAdapterInterface.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunspikes/php-ratelimiter/HEAD/src/Time/TimeAdapterInterface.php -------------------------------------------------------------------------------- /tests/Cache/Adapter/DesarrollaCacheAdapterTest.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunspikes/php-ratelimiter/HEAD/tests/Cache/Adapter/DesarrollaCacheAdapterTest.php -------------------------------------------------------------------------------- /tests/Cache/Factory/DesarrollaCacheFactoryTest.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunspikes/php-ratelimiter/HEAD/tests/Cache/Factory/DesarrollaCacheFactoryTest.php -------------------------------------------------------------------------------- /tests/Functional/AbstractThrottlerTestCase.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunspikes/php-ratelimiter/HEAD/tests/Functional/AbstractThrottlerTestCase.php -------------------------------------------------------------------------------- /tests/Functional/ElasticWindowTest.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunspikes/php-ratelimiter/HEAD/tests/Functional/ElasticWindowTest.php -------------------------------------------------------------------------------- /tests/Functional/FixedWindowTest.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunspikes/php-ratelimiter/HEAD/tests/Functional/FixedWindowTest.php -------------------------------------------------------------------------------- /tests/Functional/LeakyBucketTest.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunspikes/php-ratelimiter/HEAD/tests/Functional/LeakyBucketTest.php -------------------------------------------------------------------------------- /tests/Functional/MovingWindowTest.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunspikes/php-ratelimiter/HEAD/tests/Functional/MovingWindowTest.php -------------------------------------------------------------------------------- /tests/Functional/RetrialQueueTest.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunspikes/php-ratelimiter/HEAD/tests/Functional/RetrialQueueTest.php -------------------------------------------------------------------------------- /tests/RatelimiterTest.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunspikes/php-ratelimiter/HEAD/tests/RatelimiterTest.php -------------------------------------------------------------------------------- /tests/Throttle/Entity/DataTest.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunspikes/php-ratelimiter/HEAD/tests/Throttle/Entity/DataTest.php -------------------------------------------------------------------------------- /tests/Throttle/Factory/ThrottlerFactoryTest.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunspikes/php-ratelimiter/HEAD/tests/Throttle/Factory/ThrottlerFactoryTest.php -------------------------------------------------------------------------------- /tests/Throttle/Factory/TimeAwareThrottlerFactoryTest.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunspikes/php-ratelimiter/HEAD/tests/Throttle/Factory/TimeAwareThrottlerFactoryTest.php -------------------------------------------------------------------------------- /tests/Throttle/Hydrator/ArrayHydratorTest.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunspikes/php-ratelimiter/HEAD/tests/Throttle/Hydrator/ArrayHydratorTest.php -------------------------------------------------------------------------------- /tests/Throttle/Hydrator/HydratorFactoryTest.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunspikes/php-ratelimiter/HEAD/tests/Throttle/Hydrator/HydratorFactoryTest.php -------------------------------------------------------------------------------- /tests/Throttle/Hydrator/StringHydratorTest.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunspikes/php-ratelimiter/HEAD/tests/Throttle/Hydrator/StringHydratorTest.php -------------------------------------------------------------------------------- /tests/Throttle/Settings/AbstractWindowSettingsTest.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunspikes/php-ratelimiter/HEAD/tests/Throttle/Settings/AbstractWindowSettingsTest.php -------------------------------------------------------------------------------- /tests/Throttle/Settings/ElasticWindowSettingsTest.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunspikes/php-ratelimiter/HEAD/tests/Throttle/Settings/ElasticWindowSettingsTest.php -------------------------------------------------------------------------------- /tests/Throttle/Settings/FixedWindowSettingsTest.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunspikes/php-ratelimiter/HEAD/tests/Throttle/Settings/FixedWindowSettingsTest.php -------------------------------------------------------------------------------- /tests/Throttle/Settings/LeakyBucketSettingsTest.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunspikes/php-ratelimiter/HEAD/tests/Throttle/Settings/LeakyBucketSettingsTest.php -------------------------------------------------------------------------------- /tests/Throttle/Settings/MovingWindowSettingsTest.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunspikes/php-ratelimiter/HEAD/tests/Throttle/Settings/MovingWindowSettingsTest.php -------------------------------------------------------------------------------- /tests/Throttle/Throttler/AbstractWindowThrottlerTest.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunspikes/php-ratelimiter/HEAD/tests/Throttle/Throttler/AbstractWindowThrottlerTest.php -------------------------------------------------------------------------------- /tests/Throttle/Throttler/ElasticWindowThrottlerTest.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunspikes/php-ratelimiter/HEAD/tests/Throttle/Throttler/ElasticWindowThrottlerTest.php -------------------------------------------------------------------------------- /tests/Throttle/Throttler/FixedWindowThrottlerTest.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunspikes/php-ratelimiter/HEAD/tests/Throttle/Throttler/FixedWindowThrottlerTest.php -------------------------------------------------------------------------------- /tests/Throttle/Throttler/LeakyBucketThrottlerTest.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunspikes/php-ratelimiter/HEAD/tests/Throttle/Throttler/LeakyBucketThrottlerTest.php -------------------------------------------------------------------------------- /tests/Throttle/Throttler/MovingWindowThrottlerTest.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunspikes/php-ratelimiter/HEAD/tests/Throttle/Throttler/MovingWindowThrottlerTest.php -------------------------------------------------------------------------------- /tests/Throttle/Throttler/RetrialQueueThrottlerTest.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunspikes/php-ratelimiter/HEAD/tests/Throttle/Throttler/RetrialQueueThrottlerTest.php --------------------------------------------------------------------------------