Exemplo n.º 1
0
 /**
  * @return BlogPostInterface[]
  */
 public function listBlogs()
 {
     $blogList = [];
     // TODO List key is very bad
     $keyList = $this->bucket->getKeyList();
     foreach ($keyList as $key) {
         $blogPost = $this->getBlogPost($key);
         if (isset($blogPost)) {
             $blogList[] = $blogPost;
         }
     }
     return $blogList;
 }
Exemplo n.º 2
0
 /**
  * {@inheritdoc}
  */
 protected function doFlush()
 {
     try {
         $keyList = $this->bucket->getKeyList();
         foreach ($keyList as $key) {
             $this->bucket->delete($key);
         }
         return true;
     } catch (Exception\RiakException $e) {
         // Do nothing
     }
     return false;
 }