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