You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Adds the string value to the head (left) of the list. Creates the list if the key didn't exist. If the key exists and is not a list, FALSE is returned.
327
+
*
328
+
* @param string $key
329
+
* @param string $value String, value to push in key
330
+
* @return LONG The new length of the list in case of success, FALSE in case of Failure.
331
+
* @example
332
+
* $redis->delete('key1');
333
+
* $redis->lPush('key1', 'C'); // returns 1
334
+
* $redis->lPush('key1', 'B'); // returns 2
335
+
* $redis->lPush('key1', 'A'); // returns 3
336
+
* // key1 now points to the following list: [ 'A', 'B', 'C' ]
337
+
*/
338
+
publicfunctionlPush($key, $value) {}
339
+
340
+
/**
341
+
* Adds the string value to the tail (right) of the list. Creates the list if the key didn't exist. If the key exists and is not a list, FALSE is returned.
342
+
*
343
+
* @param string $key
344
+
* @param string $value String, value to push in key
345
+
* @return LONG The new length of the list in case of success, FALSE in case of Failure.
346
+
* @example
347
+
* $redis->delete('key1');
348
+
* $redis->rPush('key1', 'A'); // returns 1
349
+
* $redis->rPush('key1', 'B'); // returns 2
350
+
* $redis->rPush('key1', 'C'); // returns 3
351
+
* // key1 now points to the following list: [ 'A', 'B', 'C' ]
352
+
*/
353
+
publicfunctionrPush($key, $value) {}
354
+
355
+
/**
356
+
* Adds the string value to the head (left) of the list if the list exists.
357
+
*
358
+
* @param type $key
359
+
* @param type $value String, value to push in key
360
+
* @return LONG The new length of the list in case of success, FALSE in case of Failure.
361
+
* @example
362
+
* $redis->delete('key1');
363
+
* $redis->lPushx('key1', 'A'); // returns 0
364
+
* $redis->lPush('key1', 'A'); // returns 1
365
+
* $redis->lPushx('key1', 'B'); // returns 2
366
+
* $redis->lPushx('key1', 'C'); // returns 3
367
+
* // key1 now points to the following list: [ 'A', 'B', 'C' ]
368
+
*/
369
+
publicfunctionlPushx($key, $value) {}
370
+
371
+
/**
372
+
* Adds the string value to the tail (right) of the list if the ist exists. FALSE in case of Failure.
373
+
*
374
+
* @param string $key
375
+
* @param string $value String, value to push in key
376
+
* @return LONG The new length of the list in case of success, FALSE in case of Failure.
377
+
* @example
378
+
* $redis->delete('key1');
379
+
* $redis->rPushx('key1', 'A'); // returns 0
380
+
* $redis->rPush('key1', 'A'); // returns 1
381
+
* $redis->rPushx('key1', 'B'); // returns 2
382
+
* $redis->rPushx('key1', 'C'); // returns 3
383
+
* // key1 now points to the following list: [ 'A', 'B', 'C' ]
384
+
*/
385
+
publicfunctionrPushx($key, $value) {}
386
+
387
+
/**
388
+
* Returns and removes the first element of the list.
389
+
*
390
+
* @param type $key
391
+
* @return STRING if command executed successfully BOOL FALSE in case of failure (empty list)
* Is a blocking lPop(rPop) primitive. If at least one of the lists contains at least one element, the element will be popped from the head of the list and returned to the caller. Il all the list identified by the keys passed in arguments are empty, blPop will block during the specified timeout until an element is pushed to one of those lists. This element will be popped.
415
+
*
416
+
* @param array $keys Array containing the keys of the lists INTEGER Timeout Or STRING Key1 STRING Key2 STRING Key3 ... STRING Keyn INTEGER Timeout
0 commit comments