SDK
SDK PHP v3.x
1

ltrim #

Trims an existing list so that it will contain only the specified range of elements specified.

[Redis documentation]


ltrim(key, start, stop, [options], [callback]) #

Arguments Type Description
key string Key identifier
start int Starting position of the range of items to keep (inclusive)
stop int Ending position of the range of items to keep (inclusive)
options JSON Object Optional parameters
callback function Callback

Options #

Option Type Description Default
queuable boolean Make this request queuable or not true

Return value #

Returns the MemoryStorage object to allow chaining.


Callback Response #

Returns null if successful.

Usage #

Copied to clipboard!
<?php
use \Kuzzle\Kuzzle;
$kuzzle = new Kuzzle('localhost');
try {
  $kuzzle->memoryStorage()->ltrim('key', 1, 2);
}
catch (ErrorException $e) {
}