ILIAS  release_8 Revision v8.23
ilLikeAdvancedSearch Class Reference
+ Inheritance diagram for ilLikeAdvancedSearch:
+ Collaboration diagram for ilLikeAdvancedSearch:

Public Member Functions

 __createTaxonWhereCondition ()
 
 __createKeywordWhereCondition ()
 
 __createLifecycleWhereCondition ()
 
 __createEntityWhereCondition ()
 
 __createCoverageAndCondition ()
 
 __createObjectPropertiesWhereCondition (string ... $fields)
 
- Public Member Functions inherited from ilAdvancedSearch
 setMode (string $a_mode)
 
 getMode ()
 
 setOptions (array &$options)
 
 performSearch ()
 
__searchTitleDescription ()
 
 __searchTitle ()
 
 __searchDescription ()
 
 __searchGeneral ()
 
 __searchLanguage ()
 
 __searchContribute ()
 
 __searchEntity ()
 
 __searchRequirement ()
 
 __searchEducational ()
 
 __searchTypicalAgeRange ()
 
 __searchRights ()
 
 __searchClassification ()
 
 __searchTaxon ()
 
 __searchKeyword (bool $a_in_classification=false)
 
 __searchLifecycle ()
 
 __searchFormat ()
 
 __createRightsWhere ()
 
 __createClassificationWhere ()
 
 __createEducationalWhere ()
 
 __createRequirementWhere ()
 
 __getDifference (int $a_val1, int $a_val2, array $options)
 
 __getInStatement (array $a_fields)
 
- Public Member Functions inherited from ilAbstractSearch
 __construct (ilQueryParser $qp_obj)
 
 setFields (array $a_fields)
 
 getFields ()
 
 setFilter (array $a_filter)
 
 setIdFilter (array $a_id_filter)
 
 getIdFilter ()
 
 appendToFilter (string $a_type)
 
 getFilter ()
 
 __createLocateString ()
 
 __prepareFound (object $row)
 
 performSearch ()
 

Additional Inherited Members

- Protected Member Functions inherited from ilAdvancedSearch
 searchObjectProperties (string ... $fields)
 
- Protected Attributes inherited from ilAdvancedSearch
array $options = []
 
- Protected Attributes inherited from ilAbstractSearch
ilDBInterface $db
 
ilQueryParser $query_parser
 
ilSearchResult $search_result
 
array $object_types
 

Detailed Description

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

Member Function Documentation

◆ __createCoverageAndCondition()

ilLikeAdvancedSearch::__createCoverageAndCondition ( )

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

102  : string
103  {
104  if ($this->options['lom_coverage']) {
105  $where = " AND (";
106 
107  $counter = 0;
108  foreach ($this->query_parser->getQuotedWords() as $word) {
109  if ($counter++) {
110  $where .= "OR";
111  }
112 
113  $where .= $this->db->like('coverage', 'text', '%' . $word . '%');
114  }
115  $where .= ') ';
116  return $where;
117  }
118  return '';
119  }

◆ __createEntityWhereCondition()

ilLikeAdvancedSearch::__createEntityWhereCondition ( )

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

83  : string
84  {
85  if ($this->options['lom_role_entry']) {
86  $where = " WHERE (";
87 
88  $counter = 0;
89  foreach ($this->query_parser->getQuotedWords() as $word) {
90  if ($counter++) {
91  $where .= "OR";
92  }
93 
94  $where .= $this->db->like('entity', 'text', '%' . $word . '%');
95  }
96  $where .= ') ';
97  return $where;
98  }
99  return '';
100  }

◆ __createKeywordWhereCondition()

ilLikeAdvancedSearch::__createKeywordWhereCondition ( )

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

48  : string
49  {
50  $where = " WHERE (";
51 
52  $counter = 0;
53  foreach ($this->query_parser->getQuotedWords() as $word) {
54  if ($counter++) {
55  $where .= "OR";
56  }
57 
58  $where .= $this->db->like('keyword', 'text', '%' . $word . '%');
59  }
60  $where .= ') ';
61  return $where;
62  }

◆ __createLifecycleWhereCondition()

ilLikeAdvancedSearch::__createLifecycleWhereCondition ( )

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

64  : string
65  {
66  if ($this->options['lom_version']) {
67  $where = " WHERE (";
68 
69  $counter = 0;
70  foreach ($this->query_parser->getQuotedWords() as $word) {
71  if ($counter++) {
72  $where .= "OR";
73  }
74 
75  $where .= $this->db->like('meta_version', 'text', '%' . $word . '%');
76  }
77  $where .= ') ';
78  return $where;
79  }
80  return '';
81  }

◆ __createObjectPropertiesWhereCondition()

ilLikeAdvancedSearch::__createObjectPropertiesWhereCondition ( string ...  $fields)

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

121  : string
122  {
123  $concat_array = [];
124  foreach ($fields as $field) {
125  $concat_array[] = [$field, 'text'];
126  }
127  $concat = $this->db->concat($concat_array);
128 
129  $where = " WHERE (";
130 
131  $counter = 0;
132  foreach ($this->query_parser->getQuotedWords() as $word) {
133  if ($counter++) {
134  $where .= "OR";
135  }
136 
137  $where .= $this->db->like($concat, 'text', '%' . $word . '%');
138  }
139  $where .= ') ';
140 
141  return $where;
142  }

◆ __createTaxonWhereCondition()

ilLikeAdvancedSearch::__createTaxonWhereCondition ( )

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

29  : string
30  {
31  if ($this->options['lom_taxon']) {
32  $where = " WHERE (";
33 
34  $counter = 0;
35  foreach ($this->query_parser->getQuotedWords() as $word) {
36  if ($counter++) {
37  $where .= "OR";
38  }
39 
40  $where .= $this->db->like('taxon', 'text', '%' . $word . '%');
41  }
42  $where .= ') ';
43  return $where;
44  }
45  return '';
46  }

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