class RateLimitFilter extends ContentFilter (View source)

Provides rate limiting of execution of a callback

Constants

CACHE_PREFIX

Cache key prefix

Properties

protected ContentFilter $nestedContentFilter

Nested content filter

from  ContentFilter

Methods

public
__construct($nestedContentFilter = null)

No description

protected
Zend_Cache_Frontend
getCache()

Gets the cache to use

public
mixed
getContent(string $key, callable $callback)

Evaluates the result of the given callback

protected
string
getCacheKey(string $itemkey)

Determines the key to use for saving the current rate

Details

__construct($nestedContentFilter = null)

No description

Parameters

$nestedContentFilter

protected Zend_Cache_Frontend getCache()

Gets the cache to use

Return Value

Zend_Cache_Frontend

mixed getContent(string $key, callable $callback)

Evaluates the result of the given callback

Parameters

string $key

Unique key for this

callable $callback

Callback for evaluating the content

Return Value

mixed

Result of $callback()

protected string getCacheKey(string $itemkey)

Determines the key to use for saving the current rate

Parameters

string $itemkey

Input key

Return Value

string

Result key