framework/filters/RateLimiter.php
public function addRateLimitHeaders($response, $limit, $remaining, $reset)
    {
        if ($this->enableRateLimitHeaders) {
            $response->getHeaders()
                ->set('X-Rate-Limit-Limit', $limit)
                ->set('X-Rate-Limit-Remaining', $remaining)
                ->set('X-Rate-Limit-Reset', $reset);
        }
    }
public function addRateLimitHeaders($response, $limit, $remaining, $reset)
    {
        if ($this->enableRateLimitHeaders) {
            $response->getHeaders()
                ->set('X-Rate-Limit-Limit', $limit)
                ->set('X-Rate-Limit-Remaining', $remaining)
                ->set('X-Rate-Limit-Reset', $reset);
        }
    }
public function addRateLimitHeaders ( $ response , $ limit , $ remaining , $ reset ) { if ( $ this -> enableRateLimitHeaders ) { $ response -> getHeaders ( ) -> set ( 'X-Rate-Limit-Limit' , $ limit ) -> set ( 'X-Rate-Limit-Remaining' , $ remaining ) -> set ( 'X-Rate-Limit-Reset' , $ reset ) ; } }
Adds the rate limit headers to the response.
@param Response $response
@param int $limit the maximum number of allowed requests during a period
@param int $remaining the remaining number of allowed requests within the current period
@param int $reset the number of seconds to wait before having maximum number of allowed requests again
Adds the rate limit headers to the response .