/** * {@inheritdoc} */ public function exists($key) { KeyUtil::validate($key); try { return $this->clientExists($key); } catch (Exception $e) { throw ReadException::forException($e); } }
/** * {@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; }
/** * {@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; }
/** * {@inheritdoc} */ public function exists($key) { KeyUtil::validate($key); return array_key_exists($key, $this->array); }
/** * {@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); } }
/** * {@inheritdoc} */ public function exists($key) { KeyUtil::validate($key); $data = $this->load(); return array_key_exists($key, $data); }