SDK PHP v3.x

You are currently looking at the documentation of a previous version of Kuzzle. We strongly recommend that you use the latest version. You can also use the version selector in the top menu.

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!
use \Kuzzle\Kuzzle;
$kuzzle = new Kuzzle('localhost');
try {
  $kuzzle->memoryStorage()->ltrim('key', 1, 2);
catch (ErrorException $e) {