Public Member Functions | |
ilObjectSearch (&$qp_obj) | |
Constructor public. | |
& | performSearch () |
__createInStatement () |
Definition at line 37 of file class.ilObjectSearch.php.
ilObjectSearch::__createInStatement | ( | ) |
Definition at line 77 of file class.ilObjectSearch.php.
References $type.
Referenced by performSearch().
{ $type = "('"; $type .= implode("','",$this->object_types); $type .= "')"; $in = " AND type IN ".$type; return $in; }
ilObjectSearch::ilObjectSearch | ( | &$ | qp_obj | ) |
Constructor public.
Definition at line 44 of file class.ilObjectSearch.php.
References ilAbstractSearch::ilAbstractSearch(), and ilAbstractSearch::setFields().
Referenced by ilFulltextObjectSearch::ilFulltextObjectSearch(), and ilLikeObjectSearch::ilLikeObjectSearch().
{ parent::ilAbstractSearch($qp_obj); $this->setFields(array('title','description')); }
& ilObjectSearch::performSearch | ( | ) |
Reimplemented from ilAbstractSearch.
Definition at line 54 of file class.ilObjectSearch.php.
References $query, $res, $row, __createInStatement(), and ilAbstractSearch::__createLocateString().
{ $in = $this->__createInStatement(); $where = $this->__createWhereCondition(); $locate = $this->__createLocateString(); $query = "SELECT obj_id,type ". $locate. "FROM object_data ". $where." ".$in.' '. "ORDER BY obj_id DESC"; $res = $this->db->query($query); while($row = $res->fetchRow(DB_FETCHMODE_OBJECT)) { $this->search_result->addEntry($row->obj_id,$row->type,$this->__prepareFound($row)); } return $this->search_result; }