public function getName() { $str = parent::getName(); $p = '/(.*?)的/'; preg_match($p, $str, $out); $this->_name = isset($out[1]) ? $out[1] : ""; return $this->_name; }
public function getName() { $data = parent::getName(); if (!$data) { $filter = '//li[@class="site-topsearch"][1]/a/text()||2'; $this->_name = $this->_getRegexpInfo($filter, $this->getContent()); } return $this->_name; }