Ejemplo n.º 1
0
 /**
  * If this function is called, this means that there is a need to create keys with default values
  */
 protected function init()
 {
     $redisDataProvider = new RedisDataProvider($this);
     foreach ($this->initKeys as $key => $type) {
         $keyValMapper = new RedisSetMapper($this->userPwd . $this->keySeparator . $key, $this->key);
         $redisDataProvider->set($keyValMapper);
     }
     $keyValMapper = new RedisSetMapper($this->userPwd . '_' . 'init', 1);
     $redisDataProvider->set($keyValMapper);
 }