예제 #1
0
 public function refresh()
 {
     $this->cashStore->deleteAll();
     $all = $this->dataSource->getAll();
     if ($all instanceof \Traversable or is_array($all)) {
         foreach ($all as $item) {
             $this->cashStore->create($item, true);
         }
     } else {
         throw new DataStoreException("Not return data by DataSource");
     }
 }
예제 #2
0
 /**
  * {@inheritdoc}
  *
  * {@inheritdoc}
  */
 public function deleteAll()
 {
     $this->preDeleteAll();
     $result = $this->dataStore->deleteAll();
     return $this->postDeleteAll($result);
 }