ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
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
 ilAdvancedSearch (&$qp_obj)
 Constructor @access public. More...
 
 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
 ilAbstractSearch (&$qp_obj)
 Constructor @access 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 140 of file class.ilLikeAdvancedSearch.php.

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

References $ilDB.

◆ __createEntityWhereCondition()

ilLikeAdvancedSearch::__createEntityWhereCondition ( )

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

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

References $ilDB.

◆ __createKeywordWhereCondition()

ilLikeAdvancedSearch::__createKeywordWhereCondition ( )

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

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

References $ilDB.

◆ __createLifecycleWhereCondition()

ilLikeAdvancedSearch::__createLifecycleWhereCondition ( )

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

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

References $ilDB.

◆ __createTaxonWhereCondition()

ilLikeAdvancedSearch::__createTaxonWhereCondition ( )

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

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

References $ilDB.

◆ __createTitleDescriptionWhereCondition()

ilLikeAdvancedSearch::__createTitleDescriptionWhereCondition ( )

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

165 {
166 global $ilDB;
167
168 $concat = $ilDB->concat(
169 array(
170 array('title','text'),
171 array('description','text')));
172
173 $where = " WHERE (";
174
175 $counter = 0;
176 foreach($this->query_parser->getQuotedWords() as $word)
177 {
178 if($counter++)
179 {
180 $where .= "OR";
181 }
182
183 $where .= $ilDB->like($concat,'text','%'.$word.'%');
184 }
185 $where .= ') ';
186
187 return $where;
188 }

References $ilDB.


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