AnonRateLimit
extends ARateLimit
in package
Attribute for controller methods that want to limit the times a not logged-in guest can call the endpoint in a given time period.
Tags
Attributes
- #[Attribute]
- \Attribute::TARGET_METHOD
Table of Contents
Properties
Methods
- __construct() : mixed
- getLimit() : int
- getPeriod() : int
Properties
$limit
protected
int
$limit
$period
protected
int
$period
Methods
__construct()
public
__construct(int $limit, int $period) : mixed
Parameters
- $limit : int
-
The maximum number of requests that can be made in the given period in seconds.
- $period : int
-
The time period in seconds.
Tags
getLimit()
public
getLimit() : int
Tags
Return values
intgetPeriod()
public
getPeriod() : int