Client
in package
Table of Contents
- $type : string|null
- $driver : Mongo|MongoLite
- __call() : mixed
- __construct() : mixed
- decrKey() : int
- Decrement value by x
- dropCollection() : mixed
- findTerm() : mixed
- getKey() : 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() : void
- 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
- incrKey() : int
- Increment value by x
- insert() : mixed
- keyExists() : mixed
- Check if key exists
- lindex() : mixed
- Get an element from a list by its index
- lpush() : int
- Add item to a value (left)
- lset() : bool
- Set the value of an element in a list by its index
- removeKey() : int
- Delete Key(s)
- renameCollection() : mixed
- rpush() : int
- Add item to a value (right)
- save() : mixed
- setKey() : mixed
- Set value for specific key
Properties
$type
public
string|null
$type
= null
$driver
protected
Mongo|MongoLite
$driver
Methods
__call()
public
__call(mixed $method, mixed $args) : mixed
Parameters
- $method : mixed
- $args : mixed
Return values
mixed —__construct()
public
__construct(string $server[, array<string|int, mixed> $options = [] ][, array<string|int, mixed> $driverOptions = [] ]) : mixed
Parameters
- $server : string
- $options : array<string|int, mixed> = []
- $driverOptions : array<string|int, mixed> = []
Return values
mixed —decrKey()
Decrement value by x
public
decrKey(string $collection, string $key[, int $by = 1 ]) : int
Parameters
- $collection : string
- $key : string
- $by : int = 1
Return values
int —dropCollection()
public
dropCollection(string $name[, string|null $db = null ]) : mixed
Parameters
- $name : string
- $db : string|null = null
Return values
mixed —findTerm()
public
findTerm(string $collection, string $term[, array<string|int, mixed> $options = [] ]) : mixed
Parameters
- $collection : string
- $term : string
- $options : array<string|int, mixed> = []
Return values
mixed —getKey()
Get value for specific key
public
getKey(string $collection, string $key[, mixed $default = null ]) : mixed
Parameters
- $collection : string
- $key : string
- $default : mixed = null
Return values
mixed —hdel()
Delete one or more hash fields
public
hdel(string $collection, string $key) : int
Parameters
- $collection : string
- $key : string
Return values
int —hexists()
Determine if a hash field exists
public
hexists(string $collection, string $key, string $field) : bool
Parameters
- $collection : string
- $key : string
- $field : string
Return values
bool —hget()
Get the value of a hash field
public
hget(string $collection, string $key, string $field[, mixed $default = null ]) : mixed
Parameters
- $collection : string
- $key : string
- $field : string
- $default : mixed = null
Return values
mixed —hgetall()
Get all the fields and values in a hash
public
hgetall(string $collection, string $key) : array<string|int, mixed>
Parameters
- $collection : string
- $key : string
Return values
array<string|int, mixed> —hincrby()
Increment the integer value of a hash field by the given number
public
hincrby(string $collection, string $key, string $field[, int $by = 1 ]) : int
Parameters
- $collection : string
- $key : string
- $field : string
- $by : int = 1
Return values
int —hkeys()
Get all the fields in a hash
public
hkeys(string $collection, string $key) : array<string|int, mixed>
Parameters
- $collection : string
- $key : string
Return values
array<string|int, mixed> —hlen()
Get the number of fields in a hash
public
hlen(string $collection, string $key) : int
Parameters
- $collection : string
- $key : string
Return values
int —hmget()
Get the values of all the given hash fields
public
hmget(string $collection, string $key) : array<string|int, mixed>
Parameters
- $collection : string
- $key : string
Return values
array<string|int, mixed> —hmset()
Set multiple hash fields to multiple values
public
hmset(string $collection, string $key) : void
Parameters
- $collection : string
- $key : string
Return values
void —hset()
Set the string value of a hash field
public
hset(string $collection, string $key, string $field, mixed $value) : void
Parameters
- $collection : string
- $key : string
- $field : string
- $value : mixed
Return values
void —hvals()
Get all the values in a hash
public
hvals(string $collection, string $key) : array<string|int, mixed>
Parameters
- $collection : string
- $key : string
Return values
array<string|int, mixed> —incrKey()
Increment value by x
public
incrKey(string $collection, string $key[, int $by = 1 ]) : int
Parameters
- $collection : string
- $key : string
- $by : int = 1
Return values
int —insert()
public
insert(string $collection, array<string|int, mixed> &$doc) : mixed
Parameters
- $collection : string
- $doc : array<string|int, mixed>
Return values
mixed —keyExists()
Check if key exists
public
keyExists(string $collection, string $key) : mixed
Parameters
- $collection : string
-
@param string $collection
- $key : string
Return values
mixed —lindex()
Get an element from a list by its index
public
lindex(string $collection, string $key, int $index) : mixed
Parameters
- $collection : string
- $key : string
- $index : int
Return values
mixed —lpush()
Add item to a value (left)
public
lpush(string $collection, string $key, mixed $value) : int
Parameters
- $collection : string
-
@param string $collection
- $key : string
- $value : mixed
Return values
int —lset()
Set the value of an element in a list by its index
public
lset(string $collection, string $key, int $index, mixed $value) : bool
Parameters
- $collection : string
- $key : string
- $index : int
- $value : mixed
Return values
bool —removeKey()
Delete Key(s)
public
removeKey(string $collection, string $key) : int
Parameters
- $collection : string
- $key : string
Return values
int —renameCollection()
public
renameCollection(string $name, string $newname[, string|null $db = null ]) : mixed
Parameters
- $name : string
- $newname : string
- $db : string|null = null
Return values
mixed —rpush()
Add item to a value (right)
public
rpush(string $collection, string $key, mixed $value) : int
Parameters
- $collection : string
-
@param string $collection
- $key : string
- $value : mixed
Return values
int —save()
public
save(string $collection, array<string|int, mixed> &$data) : mixed
Parameters
- $collection : string
- $data : array<string|int, mixed>
Return values
mixed —setKey()
Set value for specific key
public
setKey(string $collection, string $key, mixed $value) : mixed
Parameters
- $collection : string
- $key : string
- $value : mixed