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

Public Member Functions

 __construct ($qp)
 Constructor. More...
 
 __createTaxonWhereCondition ()
 
 __createKeywordWhereCondition ()
 
 __createLifecycleWhereCondition ()
 
 __createEntityWhereCondition ()
 
 __createCoverageAndCondition ()
 
 __createTitleDescriptionWhereCondition ()
 
- Public Member Functions inherited from ilAdvancedSearch
 setMode ($a_mode)
 Define meta elements to search. More...
 
 getMode ()
 
 setOptions (&$options)
 
 performSearch ()
 
__searchTitleDescription ()
 
__searchGeneral ()
 
__searchLanguage ()
 
__searchContribute ()
 
__searchEntity ()
 
__searchRequirement ()
 
__searchEducational ()
 
__searchTypicalAgeRange ()
 
__searchRights ()
 
__searchClassification ()
 
__searchTaxon ()
 
__searchKeyword ($a_in_classification=false)
 
__searchLifecycle ()
 
__searchFormat ()
 
 __createRightsWhere ()
 
 __createClassificationWhere ()
 
 __createEducationalWhere ()
 
 __createRequirementWhere ()
 
 __getDifference ($a_val1, $a_val2, $options)
 
 __getInStatement ($a_fields)
 
- 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 ilAdvancedSearch
 $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.ilLikeAdvancedSearch.php.

Constructor & Destructor Documentation

◆ __construct()

ilLikeAdvancedSearch::__construct (   $qp)

Constructor.

Returns

Definition at line 43 of file class.ilLikeAdvancedSearch.php.

44  {
45  parent::__construct($qp);
46  }

Member Function Documentation

◆ __createCoverageAndCondition()

ilLikeAdvancedSearch::__createCoverageAndCondition ( )

Definition at line 129 of file class.ilLikeAdvancedSearch.php.

References $counter, and $ilDB.

130  {
131  global $ilDB;
132 
133  if ($this->options['lom_coverage']) {
134  $where = " AND (";
135 
136  $counter = 0;
137  foreach ($this->query_parser->getQuotedWords() as $word) {
138  if ($counter++) {
139  $where .= "OR";
140  }
141 
142  $where .= $ilDB->like('coverage', 'text', '%' . $word . '%');
143  }
144  $where .= ') ';
145  return $where;
146  }
147  return '';
148  }
$counter
global $ilDB

◆ __createEntityWhereCondition()

ilLikeAdvancedSearch::__createEntityWhereCondition ( )

Definition at line 108 of file class.ilLikeAdvancedSearch.php.

References $counter, and $ilDB.

109  {
110  global $ilDB;
111 
112  if ($this->options['lom_role_entry']) {
113  $where = " WHERE (";
114 
115  $counter = 0;
116  foreach ($this->query_parser->getQuotedWords() as $word) {
117  if ($counter++) {
118  $where .= "OR";
119  }
120 
121  $where .= $ilDB->like('entity', 'text', '%' . $word . '%');
122  }
123  $where .= ') ';
124  return $where;
125  }
126  return '';
127  }
$counter
global $ilDB

◆ __createKeywordWhereCondition()

ilLikeAdvancedSearch::__createKeywordWhereCondition ( )

Definition at line 69 of file class.ilLikeAdvancedSearch.php.

References $counter, and $ilDB.

70  {
71  global $ilDB;
72 
73  $where = " WHERE (";
74 
75  $counter = 0;
76  foreach ($this->query_parser->getQuotedWords() as $word) {
77  if ($counter++) {
78  $where .= "OR";
79  }
80 
81  $where .= $ilDB->like('keyword', 'text', '%' . $word . '%');
82  }
83  $where .= ') ';
84  return $where;
85  }
$counter
global $ilDB

◆ __createLifecycleWhereCondition()

ilLikeAdvancedSearch::__createLifecycleWhereCondition ( )

Definition at line 87 of file class.ilLikeAdvancedSearch.php.

References $counter, and $ilDB.

88  {
89  global $ilDB;
90 
91  if ($this->options['lom_version']) {
92  $where = " WHERE (";
93 
94  $counter = 0;
95  foreach ($this->query_parser->getQuotedWords() as $word) {
96  if ($counter++) {
97  $where .= "OR";
98  }
99 
100  $where .= $ilDB->like('meta_version', 'text', '%' . $word . '%');
101  }
102  $where .= ') ';
103  return $where;
104  }
105  return '';
106  }
$counter
global $ilDB

◆ __createTaxonWhereCondition()

ilLikeAdvancedSearch::__createTaxonWhereCondition ( )

Definition at line 48 of file class.ilLikeAdvancedSearch.php.

References $counter, and $ilDB.

49  {
50  global $ilDB;
51 
52  if ($this->options['lom_taxon']) {
53  $where = " WHERE (";
54 
55  $counter = 0;
56  foreach ($this->query_parser->getQuotedWords() as $word) {
57  if ($counter++) {
58  $where .= "OR";
59  }
60 
61  $where .= $ilDB->like('taxon', 'text', '%' . $word . '%');
62  }
63  $where .= ') ';
64  return $where;
65  }
66  return '';
67  }
$counter
global $ilDB

◆ __createTitleDescriptionWhereCondition()

ilLikeAdvancedSearch::__createTitleDescriptionWhereCondition ( )

Definition at line 150 of file class.ilLikeAdvancedSearch.php.

References $counter, $ilDB, and array.

151  {
152  global $ilDB;
153 
154  $concat = $ilDB->concat(
155  array(
156  array('title','text'),
157  array('description','text'))
158  );
159 
160  $where = " WHERE (";
161 
162  $counter = 0;
163  foreach ($this->query_parser->getQuotedWords() as $word) {
164  if ($counter++) {
165  $where .= "OR";
166  }
167 
168  $where .= $ilDB->like($concat, 'text', '%' . $word . '%');
169  }
170  $where .= ') ';
171 
172  return $where;
173  }
$counter
Create styles array
The data for the language used.
global $ilDB

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