PHP Class bandwidthThrottle\tokenBucket\storage\SessionStorage

This storage is in the session scope. As PHP's session are thread safe this implementation doesn't provide a locking Mutex.
Author: Markus Malkusch ([email protected])
Inheritance: implements bandwidthThrottle\tokenBucket\storage\Storage, implements bandwidthThrottle\tokenBucket\storage\scope\SessionScope
Show file Open project: bandwidth-throttle/token-bucket

Public Methods

Method Description
__construct ( string $name ) Sets the bucket's name.
bootstrap ( $microtime )
getMicrotime ( )
getMutex ( )
isBootstrapped ( )
remove ( )
setMicrotime ( $microtime )

Method Details

__construct() public method

Sets the bucket's name.
public __construct ( string $name )
$name string The bucket's name.

bootstrap() public method

public bootstrap ( $microtime )

getMicrotime() public method

public getMicrotime ( )

getMutex() public method

public getMutex ( )

isBootstrapped() public method

public isBootstrapped ( )

remove() public method

public remove ( )

setMicrotime() public method

public setMicrotime ( $microtime )