ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
◀ ilDoc Overview
class.ilAdvancedMDSearch.php
Go to the documentation of this file.
1
<?
php
2
/*
3
+-----------------------------------------------------------------------------+
4
| ILIAS open source |
5
+-----------------------------------------------------------------------------+
6
| Copyright (c) 1998-2006 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
33
include_once
'Services/Search/classes/class.ilAbstractSearch.php'
;
34
35
class
ilAdvancedMDSearch
extends
ilAbstractSearch
36
{
37
protected
$definition
;
38
protected
$adt
;
39
47
public
function
__construct
(
$query_parser
)
48
{
49
parent::__construct(
$query_parser
);
50
}
51
59
public
function
setDefinition
($a_def)
60
{
61
$this->definition = $a_def;
62
}
63
70
public
function
getDefinition
()
71
{
72
return
$this->definition
;
73
}
74
82
public
function
setSearchElement
($a_adt)
83
{
84
$this->adt = $a_adt;
85
}
86
93
public
function
getSearchElement
()
94
{
95
return
$this->adt
;
96
}
97
105
public
function
performSearch
()
106
{
107
$this->query_parser->parse();
108
109
$locate = null;
110
$parser_value = $this->
getDefinition
()->getSearchQueryParserValue($this->
getSearchElement
());
111
if
($parser_value) {
112
$this->
setFields
(array(
"value"
));
113
$locate = $this->
__createLocateString
();
114
}
115
116
$search_type = strtolower(substr(get_class($this), 12, -6));
117
118
$res_field = $this->
getDefinition
()->searchObjects(
119
$this->
getSearchElement
(),
120
$this->query_parser,
121
$this->
getFilter
(),
122
$locate,
123
$search_type
124
);
125
126
if
(is_array($res_field)) {
127
foreach
($res_field as
$row
) {
128
$found = is_array($row[
"found"
]) ? $row[
"found"
] : array();
129
$this->search_result->addEntry($row[
"obj_id"
], $row[
"type"
], $found);
130
}
131
return
$this->search_result
;
132
}
133
}
134
}
ilAbstractSearch
Definition:
class.ilAbstractSearch.php:16
ilAbstractSearch\__createLocateString
__createLocateString()
build locate string in case of AND search
Definition:
class.ilAbstractSearch.php:143
ilAdvancedMDSearch\setSearchElement
setSearchElement($a_adt)
set search element
Definition:
class.ilAdvancedMDSearch.php:82
ilAbstractSearch\setFields
setFields($a_fields)
Set fields to search.
Definition:
class.ilAbstractSearch.php:64
ilAbstractSearch\getFilter
getFilter()
get object type to search in
Definition:
class.ilAbstractSearch.php:133
ilAdvancedMDSearch
Definition:
class.ilAdvancedMDSearch.php:35
ilAdvancedMDSearch\$adt
$adt
Definition:
class.ilAdvancedMDSearch.php:38
ilAdvancedMDSearch\performSearch
performSearch()
perform search
Definition:
class.ilAdvancedMDSearch.php:105
ilAdvancedMDSearch\setDefinition
setDefinition($a_def)
set Definition
Definition:
class.ilAdvancedMDSearch.php:59
ilAdvancedMDSearch\__construct
__construct($query_parser)
Constructor.
Definition:
class.ilAdvancedMDSearch.php:47
$row
$row
Definition:
migrateto20.php:360
ilAdvancedMDSearch\getDefinition
getDefinition()
get definition
Definition:
class.ilAdvancedMDSearch.php:70
ilAdvancedMDSearch\$definition
$definition
Definition:
class.ilAdvancedMDSearch.php:37
php
ilAdvancedMDSearch\getSearchElement
getSearchElement()
get search element
Definition:
class.ilAdvancedMDSearch.php:93
ilAbstractSearch\$query_parser
$query_parser
Definition:
class.ilAbstractSearch.php:25
ilAbstractSearch\$search_result
$search_result
Definition:
class.ilAbstractSearch.php:30
Services
AdvancedMetaData
classes
class.ilAdvancedMDSearch.php
Generated on Thu Jan 30 2025 19:01:52 for ILIAS by
1.8.13 (using
Doxyfile
)