PHP Класс bandwidthThrottle\tokenBucket\storage\MemcacheStorage

This storage is in the global scope.
Устаревший: 1.0.0 There's no support for the memcache extension under PHP-7. Consider using ext-mecached and {@link MemcachedStorage}. This storage will not be removed, however there's no guarantee that it will work. As soon as ext-memcache is available for PHP-7 the deprecation will be reverted.
Автор: Markus Malkusch ([email protected])
Наследование: implements bandwidthThrottle\tokenBucket\storage\Storage, implements bandwidthThrottle\tokenBucket\storage\scope\GlobalScope
Показать файл Открыть проект

Открытые методы

Метод Описание
__construct ( string $name, Memcache $memcache ) Sets the connected memcache API and the token bucket name.
bootstrap ( $microtime )
getMicrotime ( )
getMutex ( )
isBootstrapped ( )
remove ( )
setMicrotime ( $microtime )

Описание методов

__construct() публичный Метод

The api needs to be connected already. I.e. Memcache::connect() was already called.
public __construct ( string $name, Memcache $memcache )
$name string The name of the shared token bucket.
$memcache Memcache The connected memcache API.

bootstrap() публичный Метод

public bootstrap ( $microtime )

getMicrotime() публичный Метод

public getMicrotime ( )

getMutex() публичный Метод

public getMutex ( )

isBootstrapped() публичный Метод

public isBootstrapped ( )

remove() публичный Метод

public remove ( )

setMicrotime() публичный Метод

public setMicrotime ( $microtime )