LimiterConfig
in package
This class is automatically generated to help in creating a config.
Table of Contents
Properties
- $_usedProperties : mixed
- $cachePool : mixed
- $interval : mixed
- $limit : mixed
- $lockFactory : mixed
- $policy : mixed
- $rate : mixed
- $storageService : mixed
Methods
- __construct() : mixed
- cachePool() : $this
- The cache pool to use for storing the current limiter state
- interval() : $this
- Configures the fixed interval if "policy" is set to "fixed_window" or "sliding_window". The value must be a number followed by "second", "minute", "hour", "day", "week" or "month" (or their plural equivalent).
- limit() : $this
- The maximum allowed hits in a fixed interval or burst
- lockFactory() : $this
- The service ID of the lock factory used by this limiter (or null to disable locking)
- policy() : $this
- The algorithm to be used by this limiter
- rate() : RateConfig
- storageService() : $this
- The service ID of a custom storage implementation, this precedes any configured "cache_pool"
- toArray() : array<string|int, mixed>
Properties
$_usedProperties
private
mixed
$_usedProperties
= []
$cachePool
private
mixed
$cachePool
$interval
private
mixed
$interval
$limit
private
mixed
$limit
$lockFactory
private
mixed
$lockFactory
$policy
private
mixed
$policy
$rate
private
mixed
$rate
$storageService
private
mixed
$storageService
Methods
__construct()
public
__construct([array<string|int, mixed> $value = [] ]) : mixed
Parameters
- $value : array<string|int, mixed> = []
cachePool()
The cache pool to use for storing the current limiter state
public
cachePool(ParamConfigurator|mixed $value) : $this
Parameters
- $value : ParamConfigurator|mixed
Tags
Return values
$thisinterval()
Configures the fixed interval if "policy" is set to "fixed_window" or "sliding_window". The value must be a number followed by "second", "minute", "hour", "day", "week" or "month" (or their plural equivalent).
public
interval(ParamConfigurator|mixed $value) : $this
Parameters
- $value : ParamConfigurator|mixed
Tags
Return values
$thislimit()
The maximum allowed hits in a fixed interval or burst
public
limit(ParamConfigurator|int $value) : $this
Parameters
- $value : ParamConfigurator|int
Tags
Return values
$thislockFactory()
The service ID of the lock factory used by this limiter (or null to disable locking)
public
lockFactory(ParamConfigurator|mixed $value) : $this
Parameters
- $value : ParamConfigurator|mixed
Tags
Return values
$thispolicy()
The algorithm to be used by this limiter
public
policy(ParamConfigurator|"fixed_window"|"token_bucket"|"sliding_window"|"no_limit" $value) : $this
Parameters
- $value : ParamConfigurator|"fixed_window"|"token_bucket"|"sliding_window"|"no_limit"
Tags
Return values
$thisrate()
public
rate([array<string|int, mixed> $value = [] ]) : RateConfig
Parameters
- $value : array<string|int, mixed> = []
Return values
RateConfigstorageService()
The service ID of a custom storage implementation, this precedes any configured "cache_pool"
public
storageService(ParamConfigurator|mixed $value) : $this
Parameters
- $value : ParamConfigurator|mixed
Tags
Return values
$thistoArray()
public
toArray() : array<string|int, mixed>