ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f870
All Data Structures Namespaces Files Functions Variables Modules Pages
class.ilObjectSearchFactory.php
Go to the documentation of this file.
1 <?php
2 /*
3  +-----------------------------------------------------------------------------+
4  | ILIAS open source |
5  +-----------------------------------------------------------------------------+
6  | Copyright (c) 1998-2001 ILIAS open source, University of Cologne |
7  | |
8  | This program is free software; you can redistribute it and/or |
9  | modify it under the terms of the GNU General Public License |
10  | as published by the Free Software Foundation; either version 2 |
11  | of the License, or (at your option) any later version. |
12  | |
13  | This program is distributed in the hope that it will be useful, |
14  | but WITHOUT ANY WARRANTY; without even the implied warranty of |
15  | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16  | GNU General Public License for more details. |
17  | |
18  | You should have received a copy of the GNU General Public License |
19  | along with this program; if not, write to the Free Software |
20  | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
21  +-----------------------------------------------------------------------------+
22 */
23 
24 include_once 'Services/Search/classes/class.ilSearchSettings.php';
38 {
39 
46  public static function _getObjectSearchInstance($query_parser)
47  {
48  include_once './Services/Search/classes/class.ilSearchSettings.php';
49 
50  $search_settings = new ilSearchSettings();
51 
52  if($search_settings->enabledIndex())
53  {
54  // FULLTEXT
55  include_once 'Services/Search/classes/Fulltext/class.ilFulltextObjectSearch.php';
56  return new ilFulltextObjectSearch($query_parser);
57  }
58  else
59  {
60  // LIKE
61  include_once 'Services/Search/classes/Like/class.ilLikeObjectSearch.php';
62  return new ilLikeObjectSearch($query_parser);
63  }
64 
65  }
66 
76  public static function _getShopObjectSearchInstance($query_parser)
77  {
78  include_once 'Services/Search/classes/Like/class.ilLikeShopObjectSearch.php';
79  return new ilLikeShopObjectSearch($query_parser);
80  }
81 
88  public static function _getShopMetaDataSearchInstance($query_parser)
89  {
90  include_once 'Services/Search/classes/Like/class.ilLikeShopMetaDataSearch.php';
91  return new ilLikeShopMetaDataSearch($query_parser);
92  }
93 
100  public static function _getMetaDataSearchInstance($query_parser)
101  {
102  if(ilSearchSettings::getInstance()->enabledIndex())
103  {
104  include_once 'Services/Search/classes/Fulltext/class.ilFulltextMetaDataSearch.php';
105  return new ilFulltextMetaDataSearch($query_parser);
106  }
107  else
108  {
109  include_once 'Services/Search/classes/Like/class.ilLikeMetaDataSearch.php';
110  return new ilLikeMetaDataSearch($query_parser);
111  }
112  }
113 
120  public static function _getLMContentSearchInstance($query_parser)
121  {
122  if(ilSearchSettings::getInstance()->enabledIndex())
123  {
124  include_once 'Services/Search/classes/Fulltext/class.ilFulltextLMContentSearch.php';
125  return new ilFulltextLMContentSearch($query_parser);
126  }
127  else
128  {
129  include_once './Services/Search/classes/Like/class.ilLikeLMContentSearch.php';
130  return new ilLikeLMContentSearch($query_parser);
131  }
132 
133  }
134 
141  public static function _getForumSearchInstance($query_parser)
142  {
143  if(ilSearchSettings::getInstance()->enabledIndex())
144  {
145  include_once 'Services/Search/classes/Fulltext/class.ilFulltextForumSearch.php';
146  return new ilFulltextForumSearch($query_parser);
147  }
148  else
149  {
150  include_once 'Services/Search/classes/Like/class.ilLikeForumSearch.php';
151  return new ilLikeForumSearch($query_parser);
152  }
153 
154  }
155 
162  public static function _getGlossaryDefinitionSearchInstance($query_parser)
163  {
164  if(ilSearchSettings::getInstance()->enabledIndex())
165  {
166  include_once 'Services/Search/classes/Fulltext/class.ilFulltextGlossaryDefinitionSearch.php';
167  return new ilFulltextGlossaryDefinitionSearch($query_parser);
168  }
169  else
170  {
171  include_once 'Services/Search/classes/Like/class.ilLikeGlossaryDefinitionSearch.php';
172  return new ilLikeGlossaryDefinitionSearch($query_parser);
173  }
174  }
175 
182  public static function _getExerciseSearchInstance($query_parser)
183  {
184  if(ilSearchSettings::getInstance()->enabledIndex())
185  {
186  include_once 'Services/Search/classes/Fulltext/class.ilFulltextExerciseSearch.php';
187  return new ilFulltextExerciseSearch($query_parser);
188  }
189  else
190  {
191  include_once 'Services/Search/classes/Like/class.ilLikeExerciseSearch.php';
192  return new ilLikeExerciseSearch($query_parser);
193  }
194 
195  }
196 
203  public static function _getMediacastSearchInstance($query_parser)
204  {
205  if(ilSearchSettings::getInstance()->enabledIndex())
206  {
207  include_once 'Services/Search/classes/Fulltext/class.ilFulltextMediaCastSearch.php';
208  return new ilFulltextMediaCastSearch($query_parser);
209  }
210  else
211  {
212  include_once 'Services/Search/classes/Like/class.ilLikeMediaCastSearch.php';
213  return new ilLikeMediaCastSearch($query_parser);
214  }
215 
216  }
217 
224  public static function _getTestSearchInstance($query_parser)
225  {
226  if(ilSearchSettings::getInstance()->enabledIndex())
227  {
228  include_once 'Services/Search/classes/Fulltext/class.ilFulltextTestSearch.php';
229  return new ilFulltextTestSearch($query_parser);
230  }
231  else
232  {
233  include_once 'Services/Search/classes/Like/class.ilLikeTestSearch.php';
234  return new ilLikeTestSearch($query_parser);
235  }
236  }
237 
244  public static function _getMediaPoolSearchInstance($query_parser)
245  {
246  if(ilSearchSettings::getInstance()->enabledIndex())
247  {
248  include_once 'Services/Search/classes/Fulltext/class.ilFulltextMediaPoolSearch.php';
249  return new ilFulltextMediaPoolSearch($query_parser);
250  }
251  else
252  {
253  include_once 'Services/Search/classes/Like/class.ilLikeMediaPoolSearch.php';
254  return new ilLikeMediaPoolSearch($query_parser);
255  }
256  }
257 
264  public static function _getAdvancedSearchInstance($query_parser)
265  {
266  if(ilSearchSettings::getInstance()->enabledIndex())
267  {
268  include_once 'Services/Search/classes/Fulltext/class.ilFulltextAdvancedSearch.php';
269  return new ilFulltextAdvancedSearch($query_parser);
270  }
271  else
272  {
273  include_once './Services/Search/classes/Like/class.ilLikeAdvancedSearch.php';
274  return new ilLikeAdvancedSearch($query_parser);
275  }
276  }
277 
284  public function _getWebresourceSearchInstance($query_parser)
285  {
286  if(ilSearchSettings::getInstance()->enabledIndex())
287  {
288  include_once 'Services/Search/classes/Fulltext/class.ilFulltextWebresourceSearch.php';
289  return new ilFulltextWebresourceSearch($query_parser);
290  }
291  else
292  {
293  include_once 'Services/Search/classes/Like/class.ilLikeWebresourceSearch.php';
294  return new ilLikeWebresourceSearch($query_parser);
295  }
296  }
297 
304  public static function _getUserSearchInstance($query_parser)
305  {
306  include_once 'Services/Search/classes/Like/class.ilLikeUserSearch.php';
307  return new ilLikeUserSearch($query_parser);
308  }
309 
316  public static function _getUserDefinedFieldSearchInstance($query_parser)
317  {
318  include_once 'Services/Search/classes/Like/class.ilLikeUserDefinedFieldSearch.php';
319  return new ilLikeUserDefinedFieldSearch($query_parser);
320  }
321 
322  public static function getUserMultiFieldSearchInstance($query_parser)
323  {
324  include_once './Services/Search/classes/Like/class.ilLikeUserMultiFieldSearch.php';
325  return new ilLikeUserMultiFieldSearch($query_parser);
326  }
327 
334  public static function _getWikiContentSearchInstance($query_parser)
335  {
336  if(ilSearchSettings::getInstance()->enabledIndex())
337  {
338  include_once 'Services/Search/classes/Fulltext/class.ilFulltextWikiContentSearch.php';
339  return new ilFulltextWikiContentSearch($query_parser);
340  }
341  else
342  {
343  include_once 'Services/Search/classes/Like/class.ilLikeWikiContentSearch.php';
344  return new ilLikeWikiContentSearch($query_parser);
345  }
346  }
347 
356  public static function _getAdvancedMDSearchInstance($query_parser)
357  {
358  include_once('Services/AdvancedMetaData/classes/class.ilAdvancedMDLikeSearch.php');
359  return new ilAdvancedMDLikeSearch($query_parser);
360  }
361 }
362 ?>
static _getWikiContentSearchInstance($query_parser)
get reference of ilFulltextWikiContentSearch
static _getAdvancedSearchInstance($query_parser)
get reference of ilFulltextAdvancedSearch
Class ilFulltextMediaCastSearch.
static _getMediaPoolSearchInstance($query_parser)
get reference of ilFulltextMediapoolSearch
static getUserMultiFieldSearchInstance($query_parser)
static _getAdvancedMDSearchInstance($query_parser)
get advanced meta data search instance
static _getUserSearchInstance($query_parser)
get reference of ilLikeUserSearch
_getWebresourceSearchInstance($query_parser)
get reference of ilFulltextWebresourceSearch
static _getForumSearchInstance($query_parser)
get reference of ilFulltextForumSearch
static _getExerciseSearchInstance($query_parser)
get reference of ilFulltextExerciseSearch
static _getShopMetaDataSearchInstance($query_parser)
get reference of LikeShopMetaDataSearch.
static _getMediacastSearchInstance($query_parser)
get reference of ilFulltextMediacastSearch
static _getShopObjectSearchInstance($query_parser)
get reference of LikeShopObjectSearch.
static _getGlossaryDefinitionSearchInstance($query_parser)
get reference of ilFulltextGlossaryDefinitionSearch
static _getMetaDataSearchInstance($query_parser)
get reference of ilFulltext/LikeMetaDataSearch.
Class ilFulltextWikiContentSearch.
static _getLMContentSearchInstance($query_parser)
get reference of ilFulltextLMContentSearch
static _getObjectSearchInstance($query_parser)
get reference of ilFulltext/LikeObjectSearch.
Class ilLikeMediaCastSearch.
static _getTestSearchInstance($query_parser)
get reference of ilFulltextTestSearch
static _getUserDefinedFieldSearchInstance($query_parser)
get reference of ilLikeUserDefinedFieldSearch