Overview

Namespaces

  • bandwidthThrottle
    • tokenBucket
      • storage
        • scope

Classes

  • FileStorage
  • IPCStorage
  • MemcachedStorage
  • MemcacheStorage
  • PDOStorage
  • PHPRedisStorage
  • PredisStorage
  • SessionStorage
  • SingleProcessStorage

Interfaces

  • Storage

Exceptions

  • StorageException
  • Overview
  • Namespace
  • Class

Class PredisStorage

Redis based storage which uses the Predis API.

This storage is in the global scope.

bandwidthThrottle\tokenBucket\storage\PredisStorage implements bandwidthThrottle\tokenBucket\storage\Storage, bandwidthThrottle\tokenBucket\storage\scope\GlobalScope
Final
Namespace: bandwidthThrottle\tokenBucket\storage
License: WTFPL
Author: Markus Malkusch markus@malkusch.de
Link: Donations
Located at storage/PredisStorage.php
Methods summary
public
# __construct( string $name, Predis\Client $redis )

Sets the Redis API.

Sets the Redis API.

Parameters

$name
The resource name.
$redis
The Redis API.
public
# setMicrotime( float $microtime )

Parameters

$microtime
The timestamp.

Throws

bandwidthThrottle\tokenBucket\storage\StorageException
Writing to the storage failed.

Suppresswarnings(phpmd)

public float
# getMicrotime( )

Returns

float
The timestamp.

Throws

bandwidthThrottle\tokenBucket\storage\StorageException
Reading from the storage failed.

Suppresswarnings(phpmd)

API documentation generated by ApiGen