Since: 1.0
Author: Bernhard Schussek (bschussek@gmail.com)
 /**
  * {@inheritdoc}
  */
 public function exists($key)
 {
     KeyUtil::validate($key);
     try {
         return $this->clientExists($key);
     } catch (Exception $e) {
         throw ReadException::forException($e);
     }
 }
Ejemplo n.º 2
0
 /**
  * {@inheritdoc}
  */
 public function exists($key)
 {
     KeyUtil::validate($key);
     try {
         $result = $this->connection->fetchAssoc('SELECT * FROM ' . $this->tableName . ' WHERE meta_key = ?', array($key));
     } catch (Exception $e) {
         throw ReadException::forException($e);
     }
     return $result ? true : false;
 }
Ejemplo n.º 3
0
 /**
  * {@inheritdoc}
  */
 public function exists($key)
 {
     KeyUtil::validate($key);
     try {
         $count = $this->collection->count(array('_id' => $key));
     } catch (Exception $e) {
         throw ReadException::forException($e);
     }
     return $count > 0;
 }
Ejemplo n.º 4
0
 /**
  * {@inheritdoc}
  */
 public function exists($key)
 {
     KeyUtil::validate($key);
     return array_key_exists($key, $this->array);
 }
Ejemplo n.º 5
0
 /**
  * {@inheritdoc}
  */
 public function exists($key)
 {
     KeyUtil::validate($key);
     try {
         return $this->client->bucket($this->bucketName)->get($key)->exists();
     } catch (Exception $e) {
         throw ReadException::forException($e);
     }
 }
Ejemplo n.º 6
0
 /**
  * {@inheritdoc}
  */
 public function exists($key)
 {
     KeyUtil::validate($key);
     $data = $this->load();
     return array_key_exists($key, $data);
 }