Méthode |
Description |
|
__construct ( $server = '', $version = 'v2' ) |
|
|
doRequest ( string $uri ) : mixed |
Do a server request |
|
get ( string $key, array $flags = null ) : string |
Retrieve the value of a key |
|
getKeysValue ( $root = '/', boolean $recursive = true, string $key = null ) : array |
Get all key-value pair that the key is not directory. |
|
getNode ( string $key, array $flags = null ) : array |
Retrieve the value of a key |
|
listDir ( string $key = '/', boolean $recursive = false ) : mixed |
Retrieve a directory |
|
ls ( string $key = '/', boolean $recursive = false ) : array |
Retrieve a directories key |
|
mk ( string $key, string $value, integer $ttl ) : array |
make a new key with a given value |
|
mkdir ( string $key, integer $ttl ) : array |
make a new directory |
|
mkdirWithInOrderKey ( string $dir, integer $ttl ) : array |
create a new directory with auto generated id |
|
rm ( string $key ) : array | stdClas\stdClass |
remove a key |
|
rmdir ( string $key, boolean $recursive = false ) : mixed |
Removes the key if it is directory |
|
set ( string $key, string $value, integer $ttl = null, array $condition = [] ) : stdClass |
Set the value of a key |
|
setRoot ( string $root ) : Client |
Set the default root directory. the default is /
If the root is others e.g. /linkorb when you set new key,
or set dir, all of the key is under the root
e.g. |
|
setWithInOrderKey ( string $dir, string $value, integer $ttl, array $condition = [] ) : array |
create a new key in a directory with auto generated id |
|
update ( strint $key, string $value, integer $ttl, array $condition = [] ) : array |
Update an existing key with a given value. |
|
updateDir ( string $key, integer $ttl ) : array |
Update directory |
|