Exemplo n.º 1
0
 public function testAppend()
 {
     $reply = $this->list->append(123);
     $this->assertTrue($reply);
     $reply = $this->list->append(456);
     $this->assertTrue($reply);
     $values = $this->rediska->getFromList('test', 1);
     $this->assertEquals(456, $values);
 }
Exemplo n.º 2
0
 public function rpush($listName, $value)
 {
     $key = new \Rediska_Key_List($listName);
     try {
         $key->append($value);
     } catch (\Rediska_Exception $e) {
         throw new \VisitCounter\Exception\RedisException($e->getMessage(), 0, $e);
     }
     return true;
 }
Exemplo n.º 3
0
 public function testAppendWithoutCreate()
 {
     $reply = $this->list->append(123, false);
     $this->assertEquals(0, $reply);
 }
Exemplo n.º 4
0
 public function listAdd($listKey, $val = null)
 {
     $List = new Rediska_Key_List($listKey);
     $List->setRediska($this->Rediska);
     return $List->append($val);
 }