bandwidthThrottle\tokenBucket\storage\PredisStorage::__construct PHP Method

__construct() public method

Sets the Redis API.
public __construct ( string $name, Client $redis )
$name string The resource name.
$redis Predis\Client The Redis API.
    public function __construct($name, Client $redis)
    {
        $this->key = $name;
        $this->redis = $redis;
        $this->mutex = new PredisMutex([$redis], $name);
    }