RedisLite
in package
RedisLite class.
Table of Contents
- $connection : object
- $path : string
- $table : string
- __construct() : mixed
- Constructor
- decr() : int
- Decrement value by x
- del() : int
- Delete Key(s)
- exists() : bool
- Check if key exists
- flushdb() : void
- Clear database
- get() : mixed
- Get value for specific key
- hdel() : int
- Delete one or more hash fields
- hexists() : bool
- Determine if a hash field exists
- hget() : mixed
- Get the value of a hash field
- hgetall() : array<string|int, mixed>
- Get all the fields and values in a hash
- hincrby() : int
- Increment the integer value of a hash field by the given number
- hkeys() : array<string|int, mixed>
- Get all the fields in a hash
- hlen() : int
- Get the number of fields in a hash
- hmget() : array<string|int, mixed>
- Get the values of all the given hash fields
- hmset() : mixed
- Set multiple hash fields to multiple values
- hset() : void
- Set the string value of a hash field
- hvals() : array<string|int, mixed>
- Get all the values in a hash
- incr() : int
- Increment value by x
- keys() : array<string|int, mixed>
- Get all keys matching a pattern
- lindex() : mixed
- Get an element from a list by its index
- llen() : int
- Count $value items
- lpush() : int
- Add item to a value (left)
- lset() : bool
- Set the value of an element in a list by its index
- rpush() : int
- Add item to a value (right)
- set() : void
- Set value for specific key
- type() : string
- Get value type
- createTable() : mixed
Properties
$connection
protected
object
$connection
$path
protected
string
$path
$table
protected
string
$table
Methods
__construct()
Constructor
public
__construct([string $path = ':memory:' ][, array<string|int, mixed> $options = [] ]) : mixed
Parameters
- $path : string = ':memory:'
- $options : array<string|int, mixed> = []
Return values
mixed —decr()
Decrement value by x
public
decr(string $key[, int $by = 1 ]) : int
Parameters
- $key : string
- $by : int = 1
Return values
int —del()
Delete Key(s)
public
del(string $key) : int
Parameters
- $key : string
Return values
int —exists()
Check if key exists
public
exists(string $key) : bool
Parameters
- $key : string
Return values
bool —flushdb()
Clear database
public
flushdb() : void
Return values
void —get()
Get value for specific key
public
get(string $key[, mixed $default = false ]) : mixed
Parameters
- $key : string
- $default : mixed = false
Return values
mixed —hdel()
Delete one or more hash fields
public
hdel(string $key) : int
Parameters
- $key : string
Return values
int —hexists()
Determine if a hash field exists
public
hexists(string $key, string $field) : bool
Parameters
- $key : string
- $field : string
Return values
bool —hget()
Get the value of a hash field
public
hget(string $key, string $field[, mixed $default = null ]) : mixed
Parameters
- $key : string
- $field : string
- $default : mixed = null
Return values
mixed —hgetall()
Get all the fields and values in a hash
public
hgetall(string $key) : array<string|int, mixed>
Parameters
- $key : string
Return values
array<string|int, mixed> —hincrby()
Increment the integer value of a hash field by the given number
public
hincrby(string $key, string $field[, int $by = 1 ]) : int
Parameters
- $key : string
- $field : string
- $by : int = 1
Return values
int —hkeys()
Get all the fields in a hash
public
hkeys(string $key) : array<string|int, mixed>
Parameters
- $key : string
Return values
array<string|int, mixed> —hlen()
Get the number of fields in a hash
public
hlen(string $key) : int
Parameters
- $key : string
Return values
int —hmget()
Get the values of all the given hash fields
public
hmget(string $key) : array<string|int, mixed>
Parameters
- $key : string
Return values
array<string|int, mixed> —hmset()
Set multiple hash fields to multiple values
public
hmset(string $key) : mixed
Parameters
- $key : string
Return values
mixed —hset()
Set the string value of a hash field
public
hset(string $key, string $field, mixed $value) : void
Parameters
- $key : string
- $field : string
- $value : mixed
Return values
void —hvals()
Get all the values in a hash
public
hvals(string $key) : array<string|int, mixed>
Parameters
- $key : string
Return values
array<string|int, mixed> —incr()
Increment value by x
public
incr(string $key[, int $by = 1 ]) : int
Parameters
- $key : string
- $by : int = 1
Return values
int —keys()
Get all keys matching a pattern
public
keys([string $pattern = null ]) : array<string|int, mixed>
Parameters
- $pattern : string = null
Return values
array<string|int, mixed> —lindex()
Get an element from a list by its index
public
lindex(string $key, int $index) : mixed
Parameters
- $key : string
- $index : int
Return values
mixed —llen()
Count $value items
public
llen(string $key) : int
Parameters
- $key : string
Return values
int —lpush()
Add item to a value (left)
public
lpush(string $key, mixed $value) : int
Parameters
- $key : string
- $value : mixed
Return values
int —lset()
Set the value of an element in a list by its index
public
lset(string $key, int $index, mixed $value) : bool
Parameters
- $key : string
- $index : int
- $value : mixed
Return values
bool —rpush()
Add item to a value (right)
public
rpush(string $key, mixed $value) : int
Parameters
- $key : string
- $value : mixed
Return values
int —set()
Set value for specific key
public
set(string $key, mixed $value) : void
Parameters
- $key : string
- $value : mixed
Return values
void —type()
Get value type
public
type(string $key) : string
Parameters
- $key : string
Return values
string —createTable()
protected
createTable() : mixed