PHP Interface Tolerance\Throttling\RateLimit\RateLimit

Exibir arquivo Open project: sroze/tolerance Interface Usage Examples

Public Methods

Method 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 method

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

hasReachedLimit() public method

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

tick() public method

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