Documentation

AbstractRequestRateLimiter
in package
implements RequestRateLimiterInterface

An implementation of RequestRateLimiterInterface that fits most use-cases.

Tags
author

Wouter de Jong wouter@wouterj.nl

Interfaces, Classes and Traits

RequestRateLimiterInterface
A special type of limiter that deals with requests.

Table of Contents

consume()  : RateLimit
reset()  : void
getLimiters()  : array<string|int, LimiterInterface>
getMinimalRateLimit()  : RateLimit

Methods

getLimiters()

protected abstract getLimiters(Request $request) : array<string|int, LimiterInterface>
Parameters
$request : Request
Return values
array<string|int, LimiterInterface>

a set of limiters using keys extracted from the request

getMinimalRateLimit()

private static getMinimalRateLimit(RateLimit $first, RateLimit $second) : RateLimit
Parameters
$first : RateLimit
$second : RateLimit
Return values
RateLimit

Search results