/** * Search articles by catgories without start articles * @param array $aCategories * @param int $iOffset * @param int $iNumOfRows * @param string $sResultType element of {article_id, object} * * @return array of articles */ function findMatchingContentByCategories($aCategories = array(), $iOffset = 0, $iNumOfRows = 0, $sResultType = '') { for ($i = 0; $i < count($aCategories); $i++) { if (!is_int((int) $aCategories[$i]) or !$aCategories[$i] > 0) { return array(); } } $sql = $this->_buildQuery_MatchingContentByCategories($aCategories, $iOffset, $iNumOfRows); $this->db->query($sql); $aResult = array(); while ($oRow = $this->db->getResultObject()) { if ($sResultType == 'article_language_id') { $aResult[] = $oRow->idartlang; } else { $aResult[] = $oRow; } } return $aResult; }