public function getCategoryItemHot() { $arrs = parent::getCategoryItemHot(); $this->_category_item_hot = array(); foreach ($arrs as $k => $v) { $this->_category_item_hot[$k] = str_replace("更新时间:", "", $v); } return $this->_category_item_hot; }
public function getCategoryItemHot() { $data = parent::getCategoryItemHot(); $filter = './/span[@class="corner"]/@class'; $this->_category_item_hot = array(); foreach ($data as $k => $v) { foreach ($this->_xpath->query('.//dl/dt/p[2]/text()', $filter) as $child) { $this->_category_item_hot[$k] = $child ? 1 : 0; } } return $this->_category_item_hot; }