You have injected the Request via parameter $request. This is generally not recommended as there might be multiple instances during a request cycle (f.e. when using sub-requests). Instead, it is recommended to inject the RequestStack and retrieve the current request each time you need it via getCurrentRequest().
Loading history...
23
{
24
$this->request = $request;
25
$this->rateLimit = $rateLimit;
26
}
27
28
/**
29
* @return RateLimit|null
30
*/
31
public function getRateLimit()
32
{
33
return $this->rateLimit;
34
}
35
36
/**
37
* @param RateLimit|null $rateLimit
38
*/
39
public function setRateLimit(RateLimit $rateLimit = null)