Esempio n. 1
0
 /**
  * Query to insert single data
  * @param MapperInterface $mapper
  * @return mixed
  */
 public function set(MapperInterface $mapper)
 {
     $insert = $mapper->transform();
     return $this->config->getMongo()->insert($insert);
 }
Esempio n. 2
0
 /**
  * Check if key exists. Outdated keys return 0
  * @param MapperInterface $mapper
  * @return int
  */
 public function exists(MapperInterface $mapper)
 {
     return $this->redis->exists($mapper->transform());
 }