PHP Interface ManaPHP\CounterInterface

Show file Open project: manaphp/manaphp

Public Methods

Method Description
decrement ( string $type, string $id, integer $step = 1 ) : integer Decrements the value of key by a given step.
delete ( string $type, string $id ) : void Deletes the key
get ( string $type, string $id ) : integer
increment ( string $type, string $id, integer $step = 1 ) : integer Increments the value of key by a given step.

Method Details

decrement() public method

Decrements the value of key by a given step.
public decrement ( string $type, string $id, integer $step = 1 ) : integer
$type string
$id string
$step integer
return integer the new value

delete() public method

Deletes the key
public delete ( string $type, string $id ) : void
$type string
$id string
return void

get() public method

public get ( string $type, string $id ) : integer
$type string
$id string
return integer

increment() public method

Increments the value of key by a given step.
public increment ( string $type, string $id, integer $step = 1 ) : integer
$type string
$id string
$step integer
return integer the new value