ILimiter
in
Programmatic rate limiter for web requests that are not handled by an app framework controller
Tags
Table of Contents
Methods
- registerAnonRequest() : void
- Registers attempt for an anonymous request
- registerUserRequest() : void
- Registers attempt for an authenticated request
Methods
registerAnonRequest()
Registers attempt for an anonymous request
public
registerAnonRequest(string $identifier, int $anonLimit, int $anonPeriod, string $ip) : void
Parameters
- $identifier : string
- $anonLimit : int
- $anonPeriod : int
-
in seconds
- $ip : string
Tags
registerUserRequest()
Registers attempt for an authenticated request
public
registerUserRequest(string $identifier, int $userLimit, int $userPeriod, IUser $user) : void
Parameters
- $identifier : string
- $userLimit : int
- $userPeriod : int
-
in seconds
- $user : IUser
-
the acting user