RateLimit
in package
Table of Contents
- $allowed_calls : mixed
- $group : mixed
- $id : mixed
- $memory : mixed
- $sleep : mixed
- $time_frame : mixed
- __construct() : mixed
- RateLimit constructor.
- check() : bool
- delete() : bool
- getAllowedCalls() : int
- Define the number of calls to check() allowed over a given time frame.
- getAttempts() : bool
- getID() : int
- getRateData() : bool
- getTimeFrame() : int
- setAllowedCalls() : bool
- setID() : bool
- setRateData() : bool
- setTimeFrame() : bool
Properties
$allowed_calls
protected
mixed
$allowed_calls
= 25
$group
protected
mixed
$group
= 'rate_limit'
$id
protected
mixed
$id
= 1
$memory
protected
mixed
$memory
= \null
$sleep
protected
mixed
$sleep
= \false
$time_frame
protected
mixed
$time_frame
= 60
Methods
__construct()
RateLimit constructor.
public
__construct() : mixed
Return values
mixed —check()
public
check() : bool
Return values
bool —delete()
public
delete() : bool
Return values
bool —getAllowedCalls()
Define the number of calls to check() allowed over a given time frame.
public
getAllowedCalls() : int
Return values
int —getAttempts()
public
getAttempts() : bool
Return values
bool —getID()
public
getID() : int
Return values
int —getRateData()
public
getRateData() : bool
Return values
bool —getTimeFrame()
public
getTimeFrame() : int
Return values
int —setAllowedCalls()
public
setAllowedCalls( $value) : bool
Parameters
Return values
bool —setID()
public
setID( $value) : bool
Parameters
Return values
bool —setRateData()
public
setRateData( $data) : bool
Parameters
Return values
bool —setTimeFrame()
public
setTimeFrame( $value) : bool