ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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 137 of file class.ilLikeAdvancedSearch.php.

References $DIC, and $ilDB.

138  {
139  global $DIC;
140 
141  $ilDB = $DIC['ilDB'];
142 
143  if ($this->options['lom_coverage']) {
144  $where = " AND (";
145 
146  $counter = 0;
147  foreach ($this->query_parser->getQuotedWords() as $word) {
148  if ($counter++) {
149  $where .= "OR";
150  }
151 
152  $where .= $ilDB->like('coverage', 'text', '%' . $word . '%');
153  }
154  $where .= ') ';
155  return $where;
156  }
157  return '';
158  }
global $DIC
Definition: saml.php:7
global $ilDB

◆ __createEntityWhereCondition()

ilLikeAdvancedSearch::__createEntityWhereCondition ( )

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

References $DIC, and $ilDB.

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

◆ __createKeywordWhereCondition()

ilLikeAdvancedSearch::__createKeywordWhereCondition ( )

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

References $DIC, and $ilDB.

72  {
73  global $DIC;
74 
75  $ilDB = $DIC['ilDB'];
76 
77  $where = " WHERE (";
78 
79  $counter = 0;
80  foreach ($this->query_parser->getQuotedWords() as $word) {
81  if ($counter++) {
82  $where .= "OR";
83  }
84 
85  $where .= $ilDB->like('keyword', 'text', '%' . $word . '%');
86  }
87  $where .= ') ';
88  return $where;
89  }
global $DIC
Definition: saml.php:7
global $ilDB

◆ __createLifecycleWhereCondition()

ilLikeAdvancedSearch::__createLifecycleWhereCondition ( )

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

References $DIC, and $ilDB.

92  {
93  global $DIC;
94 
95  $ilDB = $DIC['ilDB'];
96 
97  if ($this->options['lom_version']) {
98  $where = " WHERE (";
99 
100  $counter = 0;
101  foreach ($this->query_parser->getQuotedWords() as $word) {
102  if ($counter++) {
103  $where .= "OR";
104  }
105 
106  $where .= $ilDB->like('meta_version', 'text', '%' . $word . '%');
107  }
108  $where .= ') ';
109  return $where;
110  }
111  return '';
112  }
global $DIC
Definition: saml.php:7
global $ilDB

◆ __createTaxonWhereCondition()

ilLikeAdvancedSearch::__createTaxonWhereCondition ( )

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

References $DIC, and $ilDB.

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

◆ __createTitleDescriptionWhereCondition()

ilLikeAdvancedSearch::__createTitleDescriptionWhereCondition ( )

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

References $DIC, and $ilDB.

161  {
162  global $DIC;
163 
164  $ilDB = $DIC['ilDB'];
165 
166  $concat = $ilDB->concat(
167  array(
168  array('title','text'),
169  array('description','text'))
170  );
171 
172  $where = " WHERE (";
173 
174  $counter = 0;
175  foreach ($this->query_parser->getQuotedWords() as $word) {
176  if ($counter++) {
177  $where .= "OR";
178  }
179 
180  $where .= $ilDB->like($concat, 'text', '%' . $word . '%');
181  }
182  $where .= ') ';
183 
184  return $where;
185  }
global $DIC
Definition: saml.php:7
global $ilDB

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