Scrapbook

CounterInterface

Table of Contents

Methods

decrement()  : int|bool
Decrement a value atomically in the cache by its step value, which defaults to 1
increment()  : int|bool
Increment a value atomically in the cache by its step value, which defaults to 1

Methods

decrement()

Decrement a value atomically in the cache by its step value, which defaults to 1

public decrement(string $key[, int $step = 1 ]) : int|bool
Parameters
$key : string

The cache item key

$step : int = 1

The value to decrement by, defaulting to 1

Return values
int|bool

The new value on success and false on failure

increment()

Increment a value atomically in the cache by its step value, which defaults to 1

public increment(string $key[, int $step = 1 ]) : int|bool
Parameters
$key : string

The cache item key

$step : int = 1

The value to increment by, defaulting to 1

Return values
int|bool

The new value on success and false on failure


        
On this page

Search results