PHP Interface Tolerance\Throttling\RateLimit\RateLimit

Afficher le fichier Open project: sroze/tolerance Interface Usage Examples

Méthodes publiques

Méthode Description
getTicksBeforeUnderLimit ( $identifier ) : float Returns the number of ticks before the limits will be available again.
hasReachedLimit ( string $identifier ) : boolean Returns true if the limit was reached.
tick ( string $identifier ) Add a tick.

Method Details

getTicksBeforeUnderLimit() public méthode

Returns the number of ticks before the limits will be available again.
public getTicksBeforeUnderLimit ( $identifier ) : float
Résultat float

hasReachedLimit() public méthode

Returns true if the limit was reached.
public hasReachedLimit ( string $identifier ) : boolean
$identifier string
Résultat boolean

tick() public méthode

Add a tick.
public tick ( string $identifier )
$identifier string