ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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 59 of file class.ilLikeMetaDataSearch.php.

References $counter, and $ilDB.

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

◆ __createDescriptionWhereCondition()

ilLikeMetaDataSearch::__createDescriptionWhereCondition ( )

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

References $counter, and $ilDB.

107  {
108  global $ilDB;
109 
110  $concat = ' description ';
111  $where = " WHERE (";
112  $counter = 0;
113  foreach ($this->query_parser->getQuotedWords() as $word) {
114  if ($counter++) {
115  $where .= "OR";
116  }
117  #$where .= $concat;
118  #$where .= (" LIKE ('%".$word."%')");
119  $where .= $ilDB->like($concat, 'text', '%' . $word . '%');
120  }
121  return $where . ') ';
122  }
$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  if ($counter++) {
50  $where .= "OR";
51  }
52  $where .= $ilDB->like($concat, 'text', '%' . $word . '%');
53  #$where .= $concat;
54  #$where .= (" LIKE ('%".$word."%')");
55  }
56  return $where . ') ';
57  }
$counter
global $ilDB

◆ __createTitleWhereCondition()

ilLikeMetaDataSearch::__createTitleWhereCondition ( )

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

References $counter, $ilDB, and array.

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

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