ILIAS  eassessment Revision 61809
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilLikeMediaPoolSearch Class Reference
+ Inheritance diagram for ilLikeMediaPoolSearch:
+ Collaboration diagram for ilLikeMediaPoolSearch:

Public Member Functions

 ilLikeMediaPoolSearch (&$qp_obj)
 Constructor public.
 __createAndCondition ()
 __createKeywordAndCondition ()
 Condition for mob keyword search.
- Public Member Functions inherited from ilMediaPoolSearch
 ilMediaPoolSearch (&$query_parser)
 Constructor public.
performSearch ()
 performKeywordSearch ()
- Public Member Functions inherited from ilAbstractSearch
 ilAbstractSearch (&$qp_obj)
 Constructor public.
 setFields ($a_fields)
 Set fields to search.
 getFields ()
 Get fields to search.
 setFilter ($a_filter)
 set object type to search in
 setIdFilter ($a_id_filter)
 Set id filter Filters search by given object id.
 getIdFilter ()
 Get Id filter.
 appendToFilter ($a_type)
 Append object type to filter.
 getFilter ()
 get object type to search in
 __createLocateString ()
 build locate string in case of AND search
 __prepareFound (&$row)

Additional Inherited Members

- Data Fields inherited from ilAbstractSearch
 $db = null
 $query_parser = null
 $search_result = null
 $object_types = array('cat','dbk','crs','fold','grp','lm','sahs','glo','mep','htlm','exc','file','qpl','tst','svy','spl', 'icrs','icla','webr','mcst','sess','pg','st','book')

Detailed Description

Definition at line 37 of file class.ilLikeMediaPoolSearch.php.

Member Function Documentation

ilLikeMediaPoolSearch::__createAndCondition ( )

Definition at line 49 of file class.ilLikeMediaPoolSearch.php.

References $ilDB.

{
global $ilDB;
/*
$concat = " CONCAT(";
$concat .= 'title,description';
$concat .= ") ";
*/
$concat = $ilDB->concat(
array(
array('title','text')
));
$and = " AND ( ";
$counter = 0;
foreach($this->query_parser->getQuotedWords() as $word)
{
if($counter++)
{
$and .= " OR";
}
#$and .= $concat;
#$and .= ("LIKE ('%".$word."%')");
#$and .= $ilDB->like($concat,'text','%'.$word.'%');
$and .= $ilDB->like('title','text','%'.$word.'%');
}
return $and.") ";
}
ilLikeMediaPoolSearch::__createKeywordAndCondition ( )

Condition for mob keyword search.

Returns

Definition at line 84 of file class.ilLikeMediaPoolSearch.php.

References $ilDB.

{
global $ilDB;
$concat = ' keyword ';
$and = " WHERE ";
$counter = 0;
foreach($this->query_parser->getQuotedWords() as $word)
{
if($counter++)
{
$and .= " OR ";
}
$and .= $ilDB->like($concat,'text','%'.$word.'%');
}
return $and;
}
ilLikeMediaPoolSearch::ilLikeMediaPoolSearch ( $qp_obj)

Constructor public.

Definition at line 44 of file class.ilLikeMediaPoolSearch.php.

References ilMediaPoolSearch\ilMediaPoolSearch().

+ Here is the call graph for this function:


The documentation for this class was generated from the following file: