Documentation

Rdb extends StaticRdb
in package

Redis wrapper + utilities.

Table of Contents

Methods

__callStatic()  : mixed
Yeah look, this is pretty much it. It's all just typing hints.
append()  : int
blPop()  : array<string|int, mixed>|null
brPop()  : array<string|int, mixed>|null
brPoplPush()  : string|null
decr()  : int|float|null
decrBy()  : int|null
del()  : int
dump()  : string|null
eval()  : int|string|bool|array<string|int, mixed>|null
exists()  : int
expire()  : bool
expireAt()  : bool
export()  : int
flushAll()  : void
flushDb()  : void
flushPrefix()  : void
get()  : string|null
getBucket()  : RdbBucket
getConfig()  : RdbConfig
Create an Rdb configuration.
getHash()  : array<string|int, mixed>|null
getInstance()  : Rdb
Get a singleton instance of the Rdb helper.
getJson()  : mixed
getObject()  : object|null
getRange()  : string|null
hDel()  : int|null
hExists()  : bool|null
hGet()  : string|null
hGetAll()  : array<string|int, mixed>|null
hIncr()  : int|float|null
hIncrBy()  : int|null
hIncrByFloat()  : float|null
hKeys()  : array<string|int, mixed>|null
hLen()  : int|null
hmGet()  : array<string|int, mixed>|null
hmSet()  : bool|null
hScan()  : Generator<string, string>
hSet()  : bool|null
hStrLen()  : int|null
hVals()  : array<string|int, mixed>|null
import()  : array<string|int, string>
incr()  : int|float|null
incrBy()  : int|null
incrByFloat()  : float|null
inspectObject()  : string|null
keys()  : array<string|int, string>
lIndex()  : string|null
lLen()  : int|null
lock()  : RdbLock|null
lPop()  : string|null
lPush()  : int|null
lRange()  : array<string|int, mixed>|null
lRem()  : int|null
lSet()  : bool|null
lTrim()  : bool|null
match()  : bool
mGet()  : array<string|int, string|null>
mGetObjects()  : array<string|int, object|null>
move()  : bool
mScan()  : Generator<string|int, string|null>
mScanObjects()  : Generator<string|int, object|null>
mSet()  : bool
mSetObjects()  : array<string|int, int>
pack()  : int
prefix()  : Generator<string|int, string>
registerSessionHandler()  : bool
rename()  : bool
restore()  : bool
rPop()  : string|null
rPoplPush()  : string|null
rPush()  : int|null
sAdd()  : int|null
scan()  : Generator<string|int, string>
sCard()  : int|null
select()  : bool
set()  : bool|string|null
setHash()  : int
setJson()  : int
setObject()  : int
sIsMember()  : bool|null
sMembers()  : array<string|int, mixed>|null
sMove()  : bool|null
sRem()  : int|null
sScan()  : Generator<string|int, string>
substr()  : string|null
ttl()  : int|float
type()  : string|null
unpack()  : mixed
zAdd()  : int|null
zCard()  : int|null
zCount()  : int|null
zIncrBy()  : float|null
zRange()  : array<string|int, mixed>|null
zRank()  : int|null
zRem()  : int|null
zRevRank()  : int|null
zScore()  : float|null

Methods

__callStatic()

Yeah look, this is pretty much it. It's all just typing hints.

public static __callStatic(mixed $name, mixed $arguments) : mixed
Parameters
$name : mixed
$arguments : mixed

append()

public static append(string $key, string $value) : int
Parameters
$key : string
$value : string
Return values
int

blPop()

public static blPop(array<string|int, string>|string $keys[, int|float|null $timeout = = 'null' ]) : array<string|int, mixed>|null
Parameters
$keys : array<string|int, string>|string
$timeout : int|float|null = = 'null'
Return values
array<string|int, mixed>|null

brPop()

public static brPop(array<string|int, string>|string $keys[, int|float|null $timeout = = 'null' ]) : array<string|int, mixed>|null
Parameters
$keys : array<string|int, string>|string
$timeout : int|float|null = = 'null'
Return values
array<string|int, mixed>|null

brPoplPush()

public static brPoplPush(string $src, string $dst[, int|float|null $timeout = = 'null' ]) : string|null
Parameters
$src : string
$dst : string
$timeout : int|float|null = = 'null'
Return values
string|null

decr()

public static decr(string $key[, int|float $amount = = '1' ][, string $cast = = '\'auto\'' ]) : int|float|null
Parameters
$key : string
$amount : int|float = = '1'
$cast : string = = '\'auto\''
Return values
int|float|null

decrBy()

public static decrBy(string $key, int $amount) : int|null
Parameters
$key : string
$amount : int
Return values
int|null

del()

public static del(mixed ...$keys) : int
Parameters
$keys : mixed
Return values
int

dump()

public static dump(string $key) : string|null
Parameters
$key : string
Return values
string|null

eval()

public static eval(string $script[, array<string|int, mixed> $keys = = '[]' ][, array<string|int, mixed> $args = = '[]' ]) : int|string|bool|array<string|int, mixed>|null
Parameters
$script : string
$keys : array<string|int, mixed> = = '[]'
$args : array<string|int, mixed> = = '[]'
Return values
int|string|bool|array<string|int, mixed>|null

exists()

public static exists(mixed ...$keys) : int
Parameters
$keys : mixed
Return values
int

expire()

public static expire(string $key[, int|float $ttl = = '0' ]) : bool
Parameters
$key : string
$ttl : int|float = = '0'
Return values
bool

expireAt()

public static expireAt(string $key[, int|float $ttl = = '0' ]) : bool
Parameters
$key : string
$ttl : int|float = = '0'
Return values
bool

export()

public static export(string|resource $file[, array<string|int, mixed>|string $config = = '[]' ]) : int
Parameters
$file : string|resource
$config : array<string|int, mixed>|string = = '[]'
Return values
int

flushAll()

public static flushAll([bool $async = = 'false' ]) : void
Parameters
$async : bool = = 'false'

flushDb()

public static flushDb([bool $async = = 'false' ]) : void
Parameters
$async : bool = = 'false'

flushPrefix()

public static flushPrefix([bool $scan = = 'true' ]) : void
Parameters
$scan : bool = = 'true'

get()

public static get(string $key) : string|null
Parameters
$key : string
Return values
string|null

getBucket()

public static getBucket(array<string|int, mixed>|string $config) : RdbBucket
Parameters
$config : array<string|int, mixed>|string
Return values
RdbBucket

getConfig()

Create an Rdb configuration.

public static getConfig() : RdbConfig
Tags
inheritdoc
Return values
RdbConfig

getHash()

public static getHash(string $key) : array<string|int, mixed>|null
Parameters
$key : string
Return values
array<string|int, mixed>|null

getInstance()

Get a singleton instance of the Rdb helper.

public static getInstance() : Rdb
Tags
inheritdoc
Return values
Rdb

getJson()

public static getJson(string $key[, bool $throw = = 'true' ]) : mixed
Parameters
$key : string
$throw : bool = = 'true'

getObject()

public static getObject(string $key, string $expected) : object|null
Parameters
$key : string
$expected : string
Return values
object|null

getRange()

public static getRange(string $key[, int $from = = '0' ][, int $to = = '-1' ]) : string|null
Parameters
$key : string
$from : int = = '0'
$to : int = = '-1'
Return values
string|null

hDel()

public static hDel(string $key, mixed ...$fields) : int|null
Parameters
$key : string
$fields : mixed
Return values
int|null

hExists()

public static hExists(string $key, string $field) : bool|null
Parameters
$key : string
$field : string
Return values
bool|null

hGet()

public static hGet(string $key, string $field) : string|null
Parameters
$key : string
$field : string
Return values
string|null

hGetAll()

public static hGetAll(string $key) : array<string|int, mixed>|null
Parameters
$key : string
Return values
array<string|int, mixed>|null

hIncr()

public static hIncr(string $key, string $field[, int|float $amount = = '1' ][, string $cast = = '\'auto\'' ]) : int|float|null
Parameters
$key : string
$field : string
$amount : int|float = = '1'
$cast : string = = '\'auto\''
Return values
int|float|null

hIncrBy()

public static hIncrBy(string $key, string $field, int $amount) : int|null
Parameters
$key : string
$field : string
$amount : int
Return values
int|null

hIncrByFloat()

public static hIncrByFloat(string $key, string $field, float $amount) : float|null
Parameters
$key : string
$field : string
$amount : float
Return values
float|null

hKeys()

public static hKeys(string $key) : array<string|int, mixed>|null
Parameters
$key : string
Return values
array<string|int, mixed>|null

hLen()

public static hLen(string $key) : int|null
Parameters
$key : string
Return values
int|null

hmGet()

public static hmGet(string $key, mixed ...$fields) : array<string|int, mixed>|null
Parameters
$key : string
$fields : mixed
Return values
array<string|int, mixed>|null

hmSet()

public static hmSet(string $key, array<string|int, mixed> $fields) : bool|null
Parameters
$key : string
$fields : array<string|int, mixed>
Return values
bool|null

hScan()

public static hScan(string $key[, string $pattern = = '\'*\'' ]) : Generator<string, string>
Parameters
$key : string
$pattern : string = = '\'*\''
Return values
Generator<string, string>

hSet()

public static hSet(string $key, string $field, mixed $value[, bool $replace = = 'true' ]) : bool|null
Parameters
$key : string
$field : string
$value : mixed
$replace : bool = = 'true'
Return values
bool|null

hStrLen()

public static hStrLen(string $key, string $field) : int|null
Parameters
$key : string
$field : string
Return values
int|null

hVals()

public static hVals(string $key) : array<string|int, mixed>|null
Parameters
$key : string
Return values
array<string|int, mixed>|null

import()

public static import(string|resource $file[, array<string|int, mixed>|string $config = = '[]' ]) : array<string|int, string>
Parameters
$file : string|resource
$config : array<string|int, mixed>|string = = '[]'
Return values
array<string|int, string>

incr()

public static incr(string $key[, int|float $amount = = '1' ][, string $cast = = '\'auto\'' ]) : int|float|null
Parameters
$key : string
$amount : int|float = = '1'
$cast : string = = '\'auto\''
Return values
int|float|null

incrBy()

public static incrBy(string $key, int $amount) : int|null
Parameters
$key : string
$amount : int
Return values
int|null

incrByFloat()

public static incrByFloat(string $key, float $amount) : float|null
Parameters
$key : string
$amount : float
Return values
float|null

inspectObject()

public static inspectObject(string $key) : string|null
Parameters
$key : string
Return values
string|null

keys()

public static keys(string $pattern) : array<string|int, string>
Parameters
$pattern : string
Return values
array<string|int, string>

lIndex()

public static lIndex(string $key, int $index) : string|null
Parameters
$key : string
$index : int
Return values
string|null

lLen()

public static lLen(string $key) : int|null
Parameters
$key : string
Return values
int|null

lock()

public static lock(string $key[, int|float $wait = = '0' ][, int|float $ttl = = '60' ]) : RdbLock|null
Parameters
$key : string
$wait : int|float = = '0'
$ttl : int|float = = '60'
Return values
RdbLock|null

lPop()

public static lPop(string $key) : string|null
Parameters
$key : string
Return values
string|null

lPush()

public static lPush(string $key, mixed ...$items) : int|null
Parameters
$key : string
$items : mixed
Return values
int|null

lRange()

public static lRange(string $key[, int $start = = '0' ][, int $stop = = '-1' ]) : array<string|int, mixed>|null
Parameters
$key : string
$start : int = = '0'
$stop : int = = '-1'
Return values
array<string|int, mixed>|null

lRem()

public static lRem(string $key, string $item[, int $count = = '0' ]) : int|null
Parameters
$key : string
$item : string
$count : int = = '0'
Return values
int|null

lSet()

public static lSet(string $key, int $index, string $item) : bool|null
Parameters
$key : string
$index : int
$item : string
Return values
bool|null

lTrim()

public static lTrim(string $key[, int $start = = '0' ][, int $stop = = '-1' ]) : bool|null
Parameters
$key : string
$start : int = = '0'
$stop : int = = '-1'
Return values
bool|null

match()

public static match(string $pattern, string $key) : bool
Parameters
$pattern : string
$key : string
Return values
bool

mGet()

public static mGet(iterable<string|int, string> $keys) : array<string|int, string|null>
Parameters
$keys : iterable<string|int, string>
Return values
array<string|int, string|null>

mGetObjects()

public static mGetObjects(iterable<string|int, string> $keys, string $expected[, bool $nullish = = 'false' ]) : array<string|int, object|null>
Parameters
$keys : iterable<string|int, string>
$expected : string
$nullish : bool = = 'false'
Return values
array<string|int, object|null>

move()

public static move(string $key, int $database) : bool
Parameters
$key : string
$database : int
Return values
bool

mScan()

public static mScan(iterable<string|int, string> $keys) : Generator<string|int, string|null>
Parameters
$keys : iterable<string|int, string>
Return values
Generator<string|int, string|null>

mScanObjects()

public static mScanObjects(iterable<string|int, string> $keys, string $expected[, bool $nullish = = 'false' ]) : Generator<string|int, object|null>
Parameters
$keys : iterable<string|int, string>
$expected : string
$nullish : bool = = 'false'
Return values
Generator<string|int, object|null>

mSet()

public static mSet(array<string|int, string> $items) : bool
Parameters
$items : array<string|int, string>
Return values
bool

mSetObjects()

public static mSetObjects(array<string|int, object> $items) : array<string|int, int>
Parameters
$items : array<string|int, object>
Return values
array<string|int, int>

pack()

public static pack(string $key, mixed $value[, int|float $ttl = = '0' ]) : int
Parameters
$key : string
$value : mixed
$ttl : int|float = = '0'
Return values
int

prefix()

public static prefix(string $prefix, iterable<string|int, string> $items) : Generator<string|int, string>
Parameters
$prefix : string
$items : iterable<string|int, string>
Return values
Generator<string|int, string>

registerSessionHandler()

public static registerSessionHandler([string $prefix = = '\'session:\'' ]) : bool
Parameters
$prefix : string = = '\'session:\''
Return values
bool

rename()

public static rename(string $src, string $dst) : bool
Parameters
$src : string
$dst : string
Return values
bool

restore()

public static restore(string $key, int $ttl, string $value[, array<string|int, mixed> $flags = = '[]' ]) : bool
Parameters
$key : string
$ttl : int
$value : string
$flags : array<string|int, mixed> = = '[]'
Return values
bool

rPop()

public static rPop(string $key) : string|null
Parameters
$key : string
Return values
string|null

rPoplPush()

public static rPoplPush(string $src, string $dst) : string|null
Parameters
$src : string
$dst : string
Return values
string|null

rPush()

public static rPush(string $key, mixed ...$items) : int|null
Parameters
$key : string
$items : mixed
Return values
int|null

sAdd()

public static sAdd(string $key, mixed ...$values) : int|null
Parameters
$key : string
$values : mixed
Return values
int|null

scan()

public static scan(string $pattern) : Generator<string|int, string>
Parameters
$pattern : string
Return values
Generator<string|int, string>

sCard()

public static sCard(string $key) : int|null
Parameters
$key : string
Return values
int|null

select()

public static select(int $database) : bool
Parameters
$database : int
Return values
bool

set()

public static set(string $key, string $value[, int|float $ttl = = '0' ][, array<string|int, mixed> $flags = = '[]' ]) : bool|string|null
Parameters
$key : string
$value : string
$ttl : int|float = = '0'
$flags : array<string|int, mixed> = = '[]'
Return values
bool|string|null

setHash()

public static setHash(string $key, array<string|int, mixed> $value) : int
Parameters
$key : string
$value : array<string|int, mixed>
Return values
int

setJson()

public static setJson(string $key, mixed $value[, int|float $ttl = = '0' ]) : int
Parameters
$key : string
$value : mixed
$ttl : int|float = = '0'
Return values
int

setObject()

public static setObject(string $key, object $value[, int|float $ttl = = '0' ]) : int
Parameters
$key : string
$value : object
$ttl : int|float = = '0'
Return values
int

sIsMember()

public static sIsMember(string $key, string $value) : bool|null
Parameters
$key : string
$value : string
Return values
bool|null

sMembers()

public static sMembers(string $key) : array<string|int, mixed>|null
Parameters
$key : string
Return values
array<string|int, mixed>|null

sMove()

public static sMove(string $src, string $dst, string $value) : bool|null
Parameters
$src : string
$dst : string
$value : string
Return values
bool|null

sRem()

public static sRem(string $key, mixed ...$values) : int|null
Parameters
$key : string
$values : mixed
Return values
int|null

sScan()

public static sScan(string $key[, string $pattern = = '\'*\'' ]) : Generator<string|int, string>
Parameters
$key : string
$pattern : string = = '\'*\''
Return values
Generator<string|int, string>

substr()

public static substr(string $key, int $from[, int $length = = '-1' ]) : string|null
Parameters
$key : string
$from : int
$length : int = = '-1'
Return values
string|null

ttl()

public static ttl(string $key[, bool $ms = = 'false' ]) : int|float
Parameters
$key : string
$ms : bool = = 'false'
Return values
int|float

type()

public static type(string $key) : string|null
Parameters
$key : string
Return values
string|null

unpack()

public static unpack(string $key) : mixed
Parameters
$key : string

zAdd()

public static zAdd(string $key, array<string|int, float> $members) : int|null
Parameters
$key : string
$members : array<string|int, float>
Return values
int|null

zCard()

public static zCard(string $key) : int|null
Parameters
$key : string
Return values
int|null

zCount()

public static zCount(string $key, float $min, float $max) : int|null
Parameters
$key : string
$min : float
$max : float
Return values
int|null

zIncrBy()

public static zIncrBy(string $key, float $value, string $member) : float|null
Parameters
$key : string
$value : float
$member : string
Return values
float|null

zRange()

public static zRange(string $key[, int|string|null $start = = 'null' ][, int|string|null $stop = = 'null' ][, array<string|int, mixed> $flags = = '[]' ]) : array<string|int, mixed>|null
Parameters
$key : string
$start : int|string|null = = 'null'
$stop : int|string|null = = 'null'
$flags : array<string|int, mixed> = = '[]'
Return values
array<string|int, mixed>|null

zRank()

public static zRank(string $key, string $member) : int|null
Parameters
$key : string
$member : string
Return values
int|null

zRem()

public static zRem(string $key, mixed ...$members) : int|null
Parameters
$key : string
$members : mixed
Return values
int|null

zRevRank()

public static zRevRank(string $key, string $member) : int|null
Parameters
$key : string
$member : string
Return values
int|null

zScore()

public static zScore(string $key, string $member) : float|null
Parameters
$key : string
$member : string
Return values
float|null
On this page

Search results