public function getPromotion() { $str = parent::getPromotion(); $p = '/更新时间:(.*)/'; preg_match($p, $str, $out); $this->_promotion = isset($out[1]) ? $out[1] : ""; return $this->_promotion; }
public function getPromotion() { $str = parent::getPromotion(); if (!$str) { $filter = '//ul[@class="cont02 mb10"]/li[4]/text()||1'; $str = $this->_getRegexpInfo($filter, $this->getContent()); } $this->_promotion = trim(str_replace("注册时间:", "", $str)); return $this->_promotion; }