ILIAS
release_8 Revision v8.19
◀ ilDoc Overview
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
$
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
x
+
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
+
Variables
$
a
b
c
d
e
f
g
h
j
l
m
p
s
t
u
+
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
+
Data Fields
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Ö
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Variables
$
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Ö
+
Files
File List
+
Globals
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
z
+
Functions
_
a
b
c
d
e
g
h
i
m
n
p
r
s
t
u
v
x
+
Variables
$
a
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
z
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Modules
Pages
class.ilLikeUserMultiFieldSearch.php
Go to the documentation of this file.
1
<?php
2
3
declare(strict_types=1);
4
/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
5
6
17
class
ilLikeUserMultiFieldSearch
extends
ilAbstractSearch
18
{
19
public
function
performSearch
():
ilSearchResult
20
{
21
$where = $this->
__createWhereCondition
();
22
$locate = $this->
__createLocateString
();
23
24
$query
=
"SELECT usr_id "
.
25
$locate .
26
"FROM usr_data_multi "
.
27
$where;
28
29
$res
= $this->db->query(
$query
);
30
while
($row =
$res
->fetchRow(
ilDBConstants::FETCHMODE_OBJECT
)) {
31
$this->search_result->addEntry($row->usr_id,
'usr'
, $this->__prepareFound($row));
32
}
33
return
$this->search_result
;
34
}
35
36
37
public
function
setFields
(array $a_fields): void
38
{
39
$fields
= [];
40
foreach
($a_fields as $field) {
41
$fields
[] = $field;
42
}
43
parent::setFields(
$fields
);
44
}
45
46
47
public
function
__createWhereCondition
(): string
48
{
49
$fields
= $this->
getFields
();
50
$field =
$fields
[0];
51
52
$and =
" WHERE field_id = "
. $this->db->quote($field,
"text"
) .
" AND ( "
;
53
$counter = 0;
54
foreach
($this->query_parser->getQuotedWords() as $word) {
55
if
($counter++) {
56
$and .=
" OR "
;
57
}
58
59
if
(strpos($word,
'^'
) === 0) {
60
$and .= $this->db->like(
"value"
,
"text"
, substr($word, 1) .
"%"
);
61
}
else
{
62
$and .= $this->db->like(
"value"
,
"text"
,
"%"
. $word .
"%"
);
63
}
64
}
65
return
$and .
") "
;
66
}
67
}
ilAbstractSearch\getFields
getFields()
Definition:
class.ilAbstractSearch.php:62
$res
$res
Definition:
ltiservices.php:69
ilLikeUserMultiFieldSearch\setFields
setFields(array $a_fields)
Definition:
class.ilLikeUserMultiFieldSearch.php:37
ilAbstractSearch
Definition:
class.ilAbstractSearch.php:20
ilAbstractSearch\__createLocateString
__createLocateString()
Definition:
class.ilAbstractSearch.php:101
ilLikeUserMultiFieldSearch\performSearch
performSearch()
Definition:
class.ilLikeUserMultiFieldSearch.php:19
ilAbstractSearch\$fields
array $fields
Definition:
class.ilAbstractSearch.php:41
$query
$query
Definition:
proxy_ylocal.php:13
ilLikeUserMultiFieldSearch\__createWhereCondition
__createWhereCondition()
Definition:
class.ilLikeUserMultiFieldSearch.php:47
ilAbstractSearch\$search_result
ilSearchResult $search_result
Definition:
class.ilAbstractSearch.php:24
ilDBConstants\FETCHMODE_OBJECT
const FETCHMODE_OBJECT
Definition:
class.ilDBConstants.php:29
ilSearchResult
Definition:
class.ilSearchResult.php:31
ilLikeUserMultiFieldSearch
Definition:
class.ilLikeUserMultiFieldSearch.php:17
Services
Search
classes
Like
class.ilLikeUserMultiFieldSearch.php
Generated on Tue Apr 1 2025 22:02:33 for ILIAS by
1.8.13 (using
Doxyfile
)