/** * check if the inner text is in one of the search string defined in checks.search_str * return true if in, otherwise, return false */ public static function isTextInSearchString($text, $check_id, $e) { $text = strtolower(trim($text)); $checksDAO = new ChecksDAO(); $row = $checksDAO->getCheckByID($check_id); $search_strings = explode(',', strtolower(_AC($row['search_str']))); if (!is_array($search_strings)) { return true; } else { return BasicChecks::inSearchString($text, $search_strings); } }
/** * Check if the table contains more than one row or either row or column headers. * @return true if contains, otherwise, false */ public static function hasLinkChildWithText($searchStrArray) { global $global_e; foreach ($global_e->children() as $child) { if ($child->tag == 'a' && BasicChecks::inSearchString($child->attr['href'], $searchStrArray)) { return true; } } return false; }