PHP Interface Stiphle\Storage\StorageInterface

Author: Dave Marshall ([email protected])
Show file Open project: davedevelopment/stiphle Interface Usage Examples

Public Methods

Method Description
get ( string $key ) : integer Get
lock ( $key ) : void Lock
set ( string $key, mixed $value ) : void set last modified
setLockWaitTimeout ( integer $milliseconds ) Set lock wait timout
unlock ( $key ) : void Unlock

Method Details

get() public method

Get
public get ( string $key ) : integer
$key string
return integer

lock() public method

We might have multiple requests coming in at once, so we lock the storage
public lock ( $key ) : void
return void

set() public method

set last modified
public set ( string $key, mixed $value ) : void
$key string
$value mixed
return void

setLockWaitTimeout() public method

Set lock wait timout
public setLockWaitTimeout ( integer $milliseconds )
$milliseconds integer

unlock() public method

Unlock
public unlock ( $key ) : void
return void