コード例 #1
0
 protected function parseData($data, DataParser $parser = null)
 {
     $items = null;
     if ($this->cacheIsFresh() && $this->hasDBData) {
         $items = $this->dbParser->getCategory()->getListItems();
     }
     if (!$items) {
         $items = parent::parseData($data, $parser);
         $projection = $this->getProjection();
         $category = $this->dbParser->getCategory();
         $category->setTitle($this->getTitle());
         $category->setSubtitle($this->getSubtitle());
         MapDB::updateCategory($category, $items, $projection);
         //$items = $category->getListItems();
         $this->hasDBData = true;
     }
     return $items;
 }