Documentation

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

Methods

__construct()

public __construct([array<string|int, mixed> $value = [] ]) : mixed
Parameters
$value : array<string|int, mixed> = []

interval()

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
default

null

Return values
$this

lockFactory()

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
default

'lock.factory'

Return values
$this

policy()

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
default

null

Return values
$this

storageService()

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
default

null

Return values
$this

toArray()

public toArray() : array<string|int, mixed>
Return values
array<string|int, mixed>

        
On this page

Search results