Since: 1.0
Author: Bernhard Schussek (bschussek@gmail.com)
Inheritance: extends RuntimeExceptio\RuntimeException
 /**
  * {@inheritdoc}
  */
 public function keys()
 {
     try {
         return $this->clientKeys();
     } catch (Exception $e) {
         throw ReadException::forException($e);
     }
 }
Esempio n. 2
0
 /**
  * {@inheritdoc}
  */
 public function keys()
 {
     try {
         $cursor = $this->collection->find(array(), array('projection' => array('_id' => 1)));
         $keys = array();
         foreach ($cursor as $document) {
             $keys[] = $document['_id'];
         }
     } catch (Exception $e) {
         throw ReadException::forException($e);
     }
     return $keys;
 }
Esempio n. 3
0
 private function getDbRow($key)
 {
     try {
         $dbResult = $this->connection->fetchAssoc('SELECT meta_value, meta_key FROM ' . $this->tableName . ' WHERE meta_key = ?', array($key));
     } catch (Exception $e) {
         throw ReadException::forException($e);
     }
     if (empty($dbResult)) {
         return null;
     }
     return $dbResult;
 }
Esempio n. 4
0
 /**
  * {@inheritdoc}
  */
 public function keys()
 {
     try {
         return $this->client->bucket($this->bucketName)->getKeys();
     } catch (Exception $e) {
         throw ReadException::forException($e);
     }
 }