ILIAS
trunk Revision v11.0_alpha-2662-g519ff7d528f
◀ ilDoc Overview
class.ilLikeUserSearch.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
30
class
ilLikeUserSearch
extends
ilUserSearch
31
{
32
public
function
__createWhereCondition
(): string
33
{
34
$fields
= $this->
getFields
();
35
$field =
$fields
[0] .
' '
;
36
37
$and =
" WHERE ( "
;
38
39
$counter = 0;
40
foreach
($this->query_parser->getQuotedWords() as $word) {
41
if
($counter++) {
42
$and .=
" OR "
;
43
}
44
45
if
(strpos($word,
'^'
) === 0) {
46
$and .= $this->db->like($field,
'text'
, substr($word, 1) .
'%'
);
47
}
else
{
48
$and .= $this->db->like($field,
'text'
,
'%'
. $word .
'%'
);
49
}
50
}
51
return
$and .
") "
;
52
}
53
}
ilAbstractSearch\getFields
getFields()
Definition:
class.ilAbstractSearch.php:99
ilUserSearch
Definition:
class.ilUserSearch.php:29
ilLikeUserSearch\__createWhereCondition
__createWhereCondition()
Definition:
class.ilLikeUserSearch.php:32
ilAbstractSearch\$fields
array $fields
Definition:
class.ilAbstractSearch.php:51
ilLikeUserSearch
Definition:
class.ilLikeUserSearch.php:30
components
ILIAS
Search
classes
Like
class.ilLikeUserSearch.php
Generated on Wed Sep 3 2025 23:03:45 for ILIAS by
1.8.13 (using
Doxyfile
)