ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilLikeMetaDataSearch Class Reference
+ Inheritance diagram for ilLikeMetaDataSearch:
+ Collaboration diagram for ilLikeMetaDataSearch:

Public Member Functions

 __createKeywordWhereCondition ()
 
 __createContributeWhereCondition ()
 
 __createTitleWhereCondition ()
 
 __createDescriptionWhereCondition ()
 
- Public Member Functions inherited from ilMetaDataSearch
 setMode ($a_mode)
 Define meta elements to search. More...
 
 getMode ()
 
performSearch ()
 
 __createInStatement ()
 
 __searchContribute ()
 
 __searchKeywords ()
 
 __searchTitles ()
 
 __searchDescriptions ()
 
- 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 ilMetaDataSearch
 $mode = ''
 
 $query_parser = null
 
 $db = null
 
- Data Fields inherited from ilAbstractSearch
 $db = null
 
 $query_parser = null
 
 $search_result = null
 
 $object_types
 

Detailed Description

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

Member Function Documentation

◆ __createContributeWhereCondition()

ilLikeMetaDataSearch::__createContributeWhereCondition ( )

Definition at line 61 of file class.ilLikeMetaDataSearch.php.

References $counter, and $ilDB.

62  {
63  global $ilDB;
64 
65  $concat = ' entity ';
66  $where = " WHERE (";
67  $counter = 0;
68  foreach($this->query_parser->getQuotedWords() as $word)
69  {
70  if($counter++)
71  {
72  $where .= "OR";
73  }
74  #$where .= $concat;
75  #$where .= (" LIKE ('%".$word."%')");
76  $where .= $ilDB->like($concat,'text','%'.$word.'%');
77  }
78  return $where.') ';
79  }
$counter
global $ilDB

◆ __createDescriptionWhereCondition()

ilLikeMetaDataSearch::__createDescriptionWhereCondition ( )

Definition at line 111 of file class.ilLikeMetaDataSearch.php.

References $counter, and $ilDB.

112  {
113  global $ilDB;
114 
115  $concat = ' description ';
116  $where = " WHERE (";
117  $counter = 0;
118  foreach($this->query_parser->getQuotedWords() as $word)
119  {
120  if($counter++)
121  {
122  $where .= "OR";
123  }
124  #$where .= $concat;
125  #$where .= (" LIKE ('%".$word."%')");
126  $where .= $ilDB->like($concat,'text','%'.$word.'%');
127  }
128  return $where.') ';
129  }
$counter
global $ilDB

◆ __createKeywordWhereCondition()

ilLikeMetaDataSearch::__createKeywordWhereCondition ( )

Definition at line 41 of file class.ilLikeMetaDataSearch.php.

References $counter, and $ilDB.

42  {
43  global $ilDB;
44 
45  $concat = ' keyword ';
46  $where = " WHERE (";
47  $counter = 0;
48  foreach($this->query_parser->getQuotedWords() as $word)
49  {
50  if($counter++)
51  {
52  $where .= "OR";
53  }
54  $where .= $ilDB->like($concat,'text','%'.$word.'%');
55  #$where .= $concat;
56  #$where .= (" LIKE ('%".$word."%')");
57  }
58  return $where.') ';
59  }
$counter
global $ilDB

◆ __createTitleWhereCondition()

ilLikeMetaDataSearch::__createTitleWhereCondition ( )

Definition at line 80 of file class.ilLikeMetaDataSearch.php.

References $counter, $ilDB, and array.

81  {
82  global $ilDB;
83 
84  /*
85  $concat = ' CONCAT(title,coverage) '; // broken if coverage is null
86  // DONE: fix coverage search
87  $concat = ' title ';
88  */
89 
90  $concat = $ilDB->concat(
91  array(
92  array('title','text'),
93  array('coverage','text')));
94 
95 
96  $where = " WHERE (";
97  $counter = 0;
98  foreach($this->query_parser->getQuotedWords() as $word)
99  {
100  if($counter++)
101  {
102  $where .= "OR";
103  }
104  #$where .= $concat;
105  #$where .= (" LIKE ('%".$word."%')");
106  $where .= $ilDB->like($concat,'text','%'.$word.'%');
107  }
108  return $where.' )';
109  }
$counter
Create styles array
The data for the language used.
global $ilDB

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