Public Member Functions | |
| ilMDSearch (&$qp_obj) | |
| Constructor public. | |
| setMode ($a_mode) | |
| Define meta elements to search. | |
| getMode () | |
| & | performSearch () |
| __searchKeywordsOnly () | |
Data Fields | |
| $mode = '' | |
| $query_parser = null | |
| $db = null | |
Definition at line 36 of file class.ilMDSearch.php.
| ilMDSearch::__searchKeywordsOnly | ( | ) |
Definition at line 98 of file class.ilMDSearch.php.
References $counter, $query, $res, and $row.
Referenced by performSearch().
{
$where = " WHERE ";
$field = " keyword ";
foreach($this->query_parser->getWords() as $word)
{
if($counter++)
{
$where .= strtoupper($this->query_parser->getCombination());
}
$where .= $field;
$where .= ("LIKE ('%".$word."%')");
}
$query = "SELECT * FROM il_meta_keyword".
$where.
"ORDER BY meta_keyword_id DESC";
$res = $this->db->query($query);
while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
{
$this->search_result->addEntry($row->obj_id,$row->obj_type,$row->rbac_id);
}
return $this->search_result;
}
Here is the caller graph for this function:| ilMDSearch::getMode | ( | ) |
Definition at line 73 of file class.ilMDSearch.php.
Referenced by performSearch().
{
return $this->mode;
}
Here is the caller graph for this function:| ilMDSearch::ilMDSearch | ( | &$ | qp_obj | ) |
Constructor public.
Definition at line 51 of file class.ilMDSearch.php.
{
global $ilDB;
$this->query_parser =& $qp_obj;
$this->db =& $ilDB;
include_once 'Services/Search/classes/class.ilSearchResult.php';
$this->search_result = new ilSearchResult();
}
| & ilMDSearch::performSearch | ( | ) |
Definition at line 79 of file class.ilMDSearch.php.
References __searchKeywordsOnly(), and getMode().
{
switch($this->getMode())
{
case 'all':
break;
case 'keyword':
return $this->__searchKeywordsOnly();
break;
default:
echo "ilMDSearch::performSearch() no mode given";
return false;
}
}
Here is the call graph for this function:| ilMDSearch::setMode | ( | $ | a_mode | ) |
Define meta elements to search.
| string | mode keyword or all public |
Definition at line 69 of file class.ilMDSearch.php.
{
$this->mode = $a_mode;
}
| ilMDSearch::$db = null |
Definition at line 45 of file class.ilMDSearch.php.
| ilMDSearch::$mode = '' |
Definition at line 38 of file class.ilMDSearch.php.
| ilMDSearch::$query_parser = null |
Definition at line 43 of file class.ilMDSearch.php.
1.7.1