ILIAS  release_8 Revision v8.19-1-g4e8f2f9140c
All Data Structures Namespaces Files Functions Variables Modules Pages
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 Attributes inherited from ilAbstractSearch
ilDBInterface $db
 
ilQueryParser $query_parser
 
ilSearchResult $search_result
 
array $object_types
 

Detailed Description

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

Member Function Documentation

◆ __createWhereCondition()

ilLikeUserSearch::__createWhereCondition ( )

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

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

39  : string
40  {
41  $fields = $this->getFields();
42  $field = $fields[0] . ' ';
43 
44  $and = " WHERE ( ";
45 
46  $counter = 0;
47  foreach ($this->query_parser->getQuotedWords() as $word) {
48  if ($counter++) {
49  $and .= " OR ";
50  }
51 
52  if (strpos($word, '^') === 0) {
53  $and .= $this->db->like($field, 'text', substr($word, 1) . '%');
54  } else {
55  $and .= $this->db->like($field, 'text', '%' . $word . '%');
56  }
57  }
58  return $and . ") ";
59  }
+ Here is the call graph for this function:

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