ILIAS  Release_3_10_x_branch Revision 61812
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilLikeUserDefinedFieldSearch Class Reference
+ Inheritance diagram for ilLikeUserDefinedFieldSearch:
+ Collaboration diagram for ilLikeUserDefinedFieldSearch:

Public Member Functions

 ilLikeUserDefinedFieldSearch (&$qp_obj)
 Constructor public.
 __createWhereCondition ()
- Public Member Functions inherited from ilUserDefinedFieldSearch
 ilUserDefinedFieldSearch (&$query_parser)
 Constructor public.
performSearch ()
- Public Member Functions inherited from ilAbstractSearch
 ilAbstractSearch (&$qp_obj)
 Constructor public.
 setFields ($a_fields)
 Set fields to search.
 getFields ()
 Get fields to search.
 setFilter ($a_filter)
 set object type to search in
 appendToFilter ($a_type)
 Append object type to filter.
 getFilter ()
 get object type to search in
 __createLocateString ()
 build locate string in case of AND search
 __prepareFound (&$row)

Additional Inherited Members

- Data Fields inherited from ilAbstractSearch
 $db = null
 $query_parser = null
 $search_result = null
 $object_types

Detailed Description

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

Member Function Documentation

ilLikeUserDefinedFieldSearch::__createWhereCondition ( )

Definition at line 50 of file class.ilLikeUserDefinedFieldSearch.php.

References ilAbstractSearch\getFields().

{
$fields = $this->getFields();
$field = $fields[0];
$and = " WHERE ( ";
$counter = 0;
foreach($this->query_parser->getQuotedWords() as $word)
{
if($counter++)
{
$and .= " OR ";
}
$and .= ('`'.$field.'` ');
if(strpos($word,'^') === 0)
{
$and .= ("LIKE ('".substr($word,1)."%')");
}
else
{
$and .= ("LIKE ('%".$word."%')");
}
}
return $and.") ";
}

+ Here is the call graph for this function:

ilLikeUserDefinedFieldSearch::ilLikeUserDefinedFieldSearch ( $qp_obj)

Constructor public.

Definition at line 44 of file class.ilLikeUserDefinedFieldSearch.php.

References ilUserDefinedFieldSearch\ilUserDefinedFieldSearch().

+ Here is the call graph for this function:


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