ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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 $DIC, and $ilDB.

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

◆ __createDescriptionWhereCondition()

ilLikeMetaDataSearch::__createDescriptionWhereCondition ( )

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

References $DIC, and $ilDB.

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

◆ __createKeywordWhereCondition()

ilLikeMetaDataSearch::__createKeywordWhereCondition ( )

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

References $DIC, and $ilDB.

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

◆ __createTitleWhereCondition()

ilLikeMetaDataSearch::__createTitleWhereCondition ( )

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

References $DIC, and $ilDB.

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

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