Inheritance diagram for ilMetaDataSearch:
Collaboration diagram for ilMetaDataSearch:Public Member Functions | |
| ilMetaDataSearch (&$qp_obj) | |
| Constructor public. | |
| setMode ($a_mode) | |
| Define meta elements to search. | |
| getMode () | |
| & | performSearch () |
| __createInStatement () | |
| __searchContribute () | |
| __searchKeywords () | |
| __searchTitles () | |
| __searchDescriptions () | |
Data Fields | |
| $mode = '' | |
| $query_parser = null | |
| $db = null | |
Definition at line 37 of file class.ilMetaDataSearch.php.
| ilMetaDataSearch::__createInStatement | ( | ) |
Definition at line 98 of file class.ilMetaDataSearch.php.
References $type, and ilAbstractSearch::getFilter().
Referenced by __searchContribute(), __searchDescriptions(), __searchKeywords(), and __searchTitles().
{
if(!$this->getFilter())
{
return '';
}
else
{
$type = "('";
$type .= implode("','",$this->getFilter());
$type .= "')";
$in = " AND obj_type IN ".$type;
return $in;
}
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilMetaDataSearch::__searchContribute | ( | ) |
Definition at line 115 of file class.ilMetaDataSearch.php.
References $query, $res, $row, __createInStatement(), ilAbstractSearch::__createLocateString(), and ilAbstractSearch::setFields().
Referenced by performSearch().
{
$this->setFields(array('entity'));
$in = $this->__createInStatement();
$where = $this->__createContributeWhereCondition();
$locate = $this->__createLocateString();
$query = "SELECT rbac_id,obj_id,obj_type ".
$locate.
"FROM il_meta_entity ".
$where." ".$in.' ';
$res = $this->db->query($query);
while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
{
$this->search_result->addEntry($row->rbac_id,$row->obj_type,$this->__prepareFound($row),$row->obj_id);
}
return $this->search_result;
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilMetaDataSearch::__searchDescriptions | ( | ) |
Definition at line 180 of file class.ilMetaDataSearch.php.
References $query, $res, $row, __createInStatement(), ilAbstractSearch::__createLocateString(), and ilAbstractSearch::setFields().
Referenced by performSearch().
{
$this->setFields(array('description'));
$in = $this->__createInStatement();
$where = $this->__createDescriptionWhereCondition();
$locate = $this->__createLocateString();
$query = "SELECT rbac_id,obj_id,obj_type ".
$locate.
"FROM il_meta_description ".
$where." ".$in.' ';
$res = $this->db->query($query);
while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
{
$this->search_result->addEntry($row->rbac_id,$row->obj_type,$this->__prepareFound($row),$row->obj_id);
}
return $this->search_result;
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilMetaDataSearch::__searchKeywords | ( | ) |
Definition at line 138 of file class.ilMetaDataSearch.php.
References $query, $res, $row, __createInStatement(), ilAbstractSearch::__createLocateString(), and ilAbstractSearch::setFields().
Referenced by performSearch().
{
$this->setFields(array('keyword'));
$in = $this->__createInStatement();
$where = $this->__createKeywordWhereCondition();
$locate = $this->__createLocateString();
$query = "SELECT rbac_id,obj_id,obj_type ".
$locate.
"FROM il_meta_keyword ".
$where." ".$in.' ';
$res = $this->db->query($query);
while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
{
$this->search_result->addEntry($row->rbac_id,$row->obj_type,$this->__prepareFound($row),$row->obj_id);
}
return $this->search_result;
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilMetaDataSearch::__searchTitles | ( | ) |
Definition at line 159 of file class.ilMetaDataSearch.php.
References $query, $res, $row, __createInStatement(), ilAbstractSearch::__createLocateString(), and ilAbstractSearch::setFields().
Referenced by performSearch().
{
$this->setFields(array('title'));
$in = $this->__createInStatement();
$where = $this->__createTitleWhereCondition();
$locate = $this->__createLocateString();
$query = "SELECT rbac_id,obj_id,obj_type ".
$locate.
"FROM il_meta_general ".
$where." ".$in.' ';
$res = $this->db->query($query);
while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
{
$this->search_result->addEntry($row->rbac_id,$row->obj_type,$this->__prepareFound($row),$row->obj_id);
}
return $this->search_result;
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilMetaDataSearch::getMode | ( | ) |
Definition at line 67 of file class.ilMetaDataSearch.php.
Referenced by performSearch().
{
return $this->mode;
}
Here is the caller graph for this function:| ilMetaDataSearch::ilMetaDataSearch | ( | &$ | qp_obj | ) |
Constructor public.
Definition at line 52 of file class.ilMetaDataSearch.php.
References ilAbstractSearch::ilAbstractSearch().
Referenced by ilLikeMetaDataSearch::ilLikeMetaDataSearch().
{
parent::ilAbstractSearch($qp_obj);
}
Here is the call graph for this function:
Here is the caller graph for this function:| & ilMetaDataSearch::performSearch | ( | ) |
Reimplemented from ilAbstractSearch.
Definition at line 73 of file class.ilMetaDataSearch.php.
References __searchContribute(), __searchDescriptions(), __searchKeywords(), __searchTitles(), and getMode().
{
switch($this->getMode())
{
case 'keyword':
return $this->__searchKeywords();
case 'contribute':
return $this->__searchContribute();
case 'title':
return $this->__searchTitles();
case 'description':
return $this->__searchDescriptions();
default:
echo "ilMDSearch::performSearch() no mode given";
return false;
}
}
Here is the call graph for this function:| ilMetaDataSearch::setMode | ( | $ | a_mode | ) |
Define meta elements to search.
| array | elements to search in. E.G array('keyword','contribute') public |
Definition at line 63 of file class.ilMetaDataSearch.php.
{
$this->mode = $a_mode;
}
| ilMetaDataSearch::$db = null |
Reimplemented from ilAbstractSearch.
Definition at line 46 of file class.ilMetaDataSearch.php.
| ilMetaDataSearch::$mode = '' |
Definition at line 39 of file class.ilMetaDataSearch.php.
| ilMetaDataSearch::$query_parser = null |
Reimplemented from ilAbstractSearch.
Definition at line 44 of file class.ilMetaDataSearch.php.
1.7.1