ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilLikeUserSearch Class Reference
+ Inheritance diagram for ilLikeUserSearch:
+ Collaboration diagram for ilLikeUserSearch:

Public Member Functions

 __createWhereCondition ()
 
- Public Member Functions inherited from ilUserSearch
 enableActiveCheck (bool $a_enabled)
 
 enableInactiveCheck (bool $a_enabled)
 
 performSearch ()
 
- Public Member Functions inherited from ilAbstractSearch
 __construct (ilQueryParser $qp_obj)
 
 setFields (array $a_fields)
 
 getFields ()
 
 setFilter (array $a_filter)
 
 setIdFilter (array $a_id_filter)
 
 getIdFilter ()
 
 appendToFilter (string $a_type)
 
 getFilter ()
 
 __createLocateString ()
 
 __prepareFound (object $row)
 
 performSearch ()
 

Additional Inherited Members

- Protected Member Functions inherited from ilAbstractSearch
 getValidObjectTypes (ilObjectDefinition $object_definition)
 
- Protected Attributes inherited from ilAbstractSearch
ilDBInterface $db
 
ilQueryParser $query_parser
 
ilSearchResult $search_result
 
array $object_types = []
 

Detailed Description

Definition at line 30 of file class.ilLikeUserSearch.php.

Member Function Documentation

◆ __createWhereCondition()

ilLikeUserSearch::__createWhereCondition ( )

Definition at line 32 of file class.ilLikeUserSearch.php.

32 : 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 }
$counter

References $counter, ilAbstractSearch\$fields, and ilAbstractSearch\getFields().

+ Here is the call graph for this function:

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