SDK
SDK PHP v3.x
1

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]) #

ArgumentsTypeDescription
keystringKey identifier
startintStarting position of the range of items to keep (inclusive)
stopintEnding position of the range of items to keep (inclusive)
optionsJSON ObjectOptional parameters
callbackfunctionCallback

Options #

OptionTypeDescriptionDefault
queuablebooleanMake this request queuable or nottrue

Return value #

Returns the MemoryStorage object to allow chaining.


Callback Response #

Returns null if successful.

Usage #

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