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
intblPop()
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>|nullbrPop()
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>|nullbrPoplPush()
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|nulldecr()
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|nulldecrBy()
public
static decrBy(string $key, int $amount) : int|null
Parameters
- $key : string
- $amount : int
Return values
int|nulldel()
public
static del(mixed ...$keys) : int
Parameters
- $keys : mixed
Return values
intdump()
public
static dump(string $key) : string|null
Parameters
- $key : string
Return values
string|nulleval()
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>|nullexists()
public
static exists(mixed ...$keys) : int
Parameters
- $keys : mixed
Return values
intexpire()
public
static expire(string $key[, int|float $ttl = = '0' ]) : bool
Parameters
- $key : string
- $ttl : int|float = = '0'
Return values
boolexpireAt()
public
static expireAt(string $key[, int|float $ttl = = '0' ]) : bool
Parameters
- $key : string
- $ttl : int|float = = '0'
Return values
boolexport()
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
intflushAll()
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|nullgetBucket()
public
static getBucket(array<string|int, mixed>|string $config) : RdbBucket
Parameters
- $config : array<string|int, mixed>|string
Return values
RdbBucketgetConfig()
Create an Rdb configuration.
public
static getConfig() : RdbConfig
Tags
Return values
RdbConfiggetHash()
public
static getHash(string $key) : array<string|int, mixed>|null
Parameters
- $key : string
Return values
array<string|int, mixed>|nullgetInstance()
Get a singleton instance of the Rdb helper.
public
static getInstance() : Rdb
Tags
Return values
RdbgetJson()
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|nullgetRange()
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|nullhDel()
public
static hDel(string $key, mixed ...$fields) : int|null
Parameters
- $key : string
- $fields : mixed
Return values
int|nullhExists()
public
static hExists(string $key, string $field) : bool|null
Parameters
- $key : string
- $field : string
Return values
bool|nullhGet()
public
static hGet(string $key, string $field) : string|null
Parameters
- $key : string
- $field : string
Return values
string|nullhGetAll()
public
static hGetAll(string $key) : array<string|int, mixed>|null
Parameters
- $key : string
Return values
array<string|int, mixed>|nullhIncr()
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|nullhIncrBy()
public
static hIncrBy(string $key, string $field, int $amount) : int|null
Parameters
- $key : string
- $field : string
- $amount : int
Return values
int|nullhIncrByFloat()
public
static hIncrByFloat(string $key, string $field, float $amount) : float|null
Parameters
- $key : string
- $field : string
- $amount : float
Return values
float|nullhKeys()
public
static hKeys(string $key) : array<string|int, mixed>|null
Parameters
- $key : string
Return values
array<string|int, mixed>|nullhLen()
public
static hLen(string $key) : int|null
Parameters
- $key : string
Return values
int|nullhmGet()
public
static hmGet(string $key, mixed ...$fields) : array<string|int, mixed>|null
Parameters
- $key : string
- $fields : mixed
Return values
array<string|int, mixed>|nullhmSet()
public
static hmSet(string $key, array<string|int, mixed> $fields) : bool|null
Parameters
- $key : string
- $fields : array<string|int, mixed>
Return values
bool|nullhScan()
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|nullhStrLen()
public
static hStrLen(string $key, string $field) : int|null
Parameters
- $key : string
- $field : string
Return values
int|nullhVals()
public
static hVals(string $key) : array<string|int, mixed>|null
Parameters
- $key : string
Return values
array<string|int, mixed>|nullimport()
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|nullincrBy()
public
static incrBy(string $key, int $amount) : int|null
Parameters
- $key : string
- $amount : int
Return values
int|nullincrByFloat()
public
static incrByFloat(string $key, float $amount) : float|null
Parameters
- $key : string
- $amount : float
Return values
float|nullinspectObject()
public
static inspectObject(string $key) : string|null
Parameters
- $key : string
Return values
string|nullkeys()
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|nulllLen()
public
static lLen(string $key) : int|null
Parameters
- $key : string
Return values
int|nulllock()
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|nulllPop()
public
static lPop(string $key) : string|null
Parameters
- $key : string
Return values
string|nulllPush()
public
static lPush(string $key, mixed ...$items) : int|null
Parameters
- $key : string
- $items : mixed
Return values
int|nulllRange()
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>|nulllRem()
public
static lRem(string $key, string $item[, int $count = = '0' ]) : int|null
Parameters
- $key : string
- $item : string
- $count : int = = '0'
Return values
int|nulllSet()
public
static lSet(string $key, int $index, string $item) : bool|null
Parameters
- $key : string
- $index : int
- $item : string
Return values
bool|nulllTrim()
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|nullmatch()
public
static match(string $pattern, string $key) : bool
Parameters
- $pattern : string
- $key : string
Return values
boolmGet()
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
boolmScan()
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
boolmSetObjects()
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
intprefix()
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
boolrename()
public
static rename(string $src, string $dst) : bool
Parameters
- $src : string
- $dst : string
Return values
boolrestore()
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
boolrPop()
public
static rPop(string $key) : string|null
Parameters
- $key : string
Return values
string|nullrPoplPush()
public
static rPoplPush(string $src, string $dst) : string|null
Parameters
- $src : string
- $dst : string
Return values
string|nullrPush()
public
static rPush(string $key, mixed ...$items) : int|null
Parameters
- $key : string
- $items : mixed
Return values
int|nullsAdd()
public
static sAdd(string $key, mixed ...$values) : int|null
Parameters
- $key : string
- $values : mixed
Return values
int|nullscan()
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|nullselect()
public
static select(int $database) : bool
Parameters
- $database : int
Return values
boolset()
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|nullsetHash()
public
static setHash(string $key, array<string|int, mixed> $value) : int
Parameters
- $key : string
- $value : array<string|int, mixed>
Return values
intsetJson()
public
static setJson(string $key, mixed $value[, int|float $ttl = = '0' ]) : int
Parameters
- $key : string
- $value : mixed
- $ttl : int|float = = '0'
Return values
intsetObject()
public
static setObject(string $key, object $value[, int|float $ttl = = '0' ]) : int
Parameters
- $key : string
- $value : object
- $ttl : int|float = = '0'
Return values
intsIsMember()
public
static sIsMember(string $key, string $value) : bool|null
Parameters
- $key : string
- $value : string
Return values
bool|nullsMembers()
public
static sMembers(string $key) : array<string|int, mixed>|null
Parameters
- $key : string
Return values
array<string|int, mixed>|nullsMove()
public
static sMove(string $src, string $dst, string $value) : bool|null
Parameters
- $src : string
- $dst : string
- $value : string
Return values
bool|nullsRem()
public
static sRem(string $key, mixed ...$values) : int|null
Parameters
- $key : string
- $values : mixed
Return values
int|nullsScan()
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|nullttl()
public
static ttl(string $key[, bool $ms = = 'false' ]) : int|float
Parameters
- $key : string
- $ms : bool = = 'false'
Return values
int|floattype()
public
static type(string $key) : string|null
Parameters
- $key : string
Return values
string|nullunpack()
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|nullzCard()
public
static zCard(string $key) : int|null
Parameters
- $key : string
Return values
int|nullzCount()
public
static zCount(string $key, float $min, float $max) : int|null
Parameters
- $key : string
- $min : float
- $max : float
Return values
int|nullzIncrBy()
public
static zIncrBy(string $key, float $value, string $member) : float|null
Parameters
- $key : string
- $value : float
- $member : string
Return values
float|nullzRange()
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>|nullzRank()
public
static zRank(string $key, string $member) : int|null
Parameters
- $key : string
- $member : string
Return values
int|nullzRem()
public
static zRem(string $key, mixed ...$members) : int|null
Parameters
- $key : string
- $members : mixed
Return values
int|nullzRevRank()
public
static zRevRank(string $key, string $member) : int|null
Parameters
- $key : string
- $member : string
Return values
int|nullzScore()
public
static zScore(string $key, string $member) : float|null
Parameters
- $key : string
- $member : string