ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilLikeTestSearch Class Reference
+ Inheritance diagram for ilLikeTestSearch:
+ Collaboration diagram for ilLikeTestSearch:

Public Member Functions

 __createWhereCondition ()
 
- Public Member Functions inherited from ilTestSearch
__searchTestIntroduction ()
 
__searchTestTitle ()
 
__searchSurveyIntroduction ()
 
__searchSurveyTitle ()
 
 performSearch ()
 
- Public Member Functions inherited from ilAbstractSearch
 __construct ($qp_obj)
 Constructor public. More...
 
 setFields ($a_fields)
 Set fields to search. More...
 
 getFields ()
 Get fields to search. More...
 
 setFilter ($a_filter)
 set object type to search in More...
 
 setIdFilter ($a_id_filter)
 Set id filter Filters search by given object id. More...
 
 getIdFilter ()
 Get Id filter. More...
 
 appendToFilter ($a_type)
 Append object type to filter. More...
 
 getFilter ()
 get object type to search in More...
 
 __createLocateString ()
 build locate string in case of AND search More...
 
 __prepareFound (&$row)
 
 performSearch ()
 

Additional Inherited Members

- Data Fields inherited from ilAbstractSearch
 $db = null
 
 $query_parser = null
 
 $search_result = null
 
 $object_types
 

Detailed Description

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

Member Function Documentation

◆ __createWhereCondition()

ilLikeTestSearch::__createWhereCondition ( )

Definition at line 39 of file class.ilLikeTestSearch.php.

References $counter, $ilDB, and ilAbstractSearch\getFields().

40  {
41  global $ilDB;
42 
43  foreach ($this->getFields() as $field) {
44  $tmp_field[$field] = 'text';
45  }
46 
47  $and = " WHERE ";
48  $counter = 0;
49  foreach ($this->query_parser->getQuotedWords() as $word) {
50  foreach ($this->getFields() as $field) {
51  if ($counter++) {
52  $and .= " OR ";
53  }
54  $and .= $ilDB->like($field, 'text', '%' . $word . '%');
55  }
56  }
57  return $and;
58  }
getFields()
Get fields to search.
$counter
global $ilDB
+ Here is the call graph for this function:

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