/** * Returns the value of the given property; throws * InvalidPropertyHandlerException if the property didn't exist. * * @param string $p_property * @return mixed */ public function __get($p_property) { $p_property = MetaAction::TranslateProperty($p_property); if ($p_property == 'results_count') { if (!empty($this->m_totalCount)) { return $this->m_totalCount; } if ($this->m_properties['scope'] == 'index') { Article::SearchByKeyword($this->m_properties['search_keywords'], $this->m_properties['match_all'], $this->m_properties['constraints'], array(), 0, 0, $this->m_totalCount, true); } else { Article::SearchByField($this->m_properties['search_keywords'], $this->m_properties['scope'], $this->m_properties['match_all'], $this->m_properties['constraints'], array(), 0, 0, $this->m_totalCount, true); } return $this->m_totalCount; } return parent::__get($p_property); }