Exemple #1
0
 public function setUp()
 {
     $this->redis = new RedisCore();
     $this->redis->connect('127.0.0.1', 6379);
     $this->redis->select(1);
     $this->redis->flushDB();
     Redis::connection($this->redis);
 }
Exemple #2
0
 public function __construct($name, array $options = array())
 {
     $defaults = array('namespace' => static::$namespace);
     $options += $defaults;
     $this->name = $name;
     $this->connection = Redis::connection();
     $this->setNamespace($options['namespace']);
 }
 public function setUp()
 {
     $this->redis = new RedisCore();
     $this->redis->connect('127.0.0.1', 6379);
     $this->redis->select(1);
     $this->redis->flushDB();
     Redis::connection($this->redis);
     $namespace = Leaderboard::$namespace;
     $this->prefix = "{$namespace}:";
 }