ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilLikeWebresourceSearch Class Reference

Class webresource search. More...

+ Inheritance diagram for ilLikeWebresourceSearch:
+ Collaboration diagram for ilLikeWebresourceSearch:

Public Member Functions

 __construct ($qp_obj)
 Constructor public. More...
 
 __createWhereCondition ()
 
- Public Member Functions inherited from ilWebresourceSearch
 performSearch ()
 
 __createAndCondition ()
 
- Public Member Functions inherited from ilAbstractSearch
 __construct ($qp_obj)
 Constructor public. More...
 
 setFields ($a_fields)
 Set fields to search. More...
 
 getFields ()
 Get fields to search. More...
 
 setFilter ($a_filter)
 set object type to search in More...
 
 setIdFilter ($a_id_filter)
 Set id filter Filters search by given object id. More...
 
 getIdFilter ()
 Get Id filter. More...
 
 appendToFilter ($a_type)
 Append object type to filter. More...
 
 getFilter ()
 get object type to search in More...
 
 __createLocateString ()
 build locate string in case of AND search More...
 
 __prepareFound (&$row)
 
 performSearch ()
 

Additional Inherited Members

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

Detailed Description

Class webresource search.

Performs Mysql Like search in object_data title and description

Author
Stefan Meyer smeye.nosp@m.r.il.nosp@m.ias@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

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

Constructor & Destructor Documentation

◆ __construct()

ilLikeWebresourceSearch::__construct (   $qp_obj)

Constructor public.

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

45  {
46  parent::__construct($qp_obj);
47  }

Member Function Documentation

◆ __createWhereCondition()

ilLikeWebresourceSearch::__createWhereCondition ( )

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

References $counter, and $ilDB.

51  {
52  global $ilDB;
53 
54  $concat = ' title ';
55 
56  $and = " WHERE ";
57  $counter = 0;
58  foreach ($this->query_parser->getQuotedWords() as $word) {
59  if ($counter++) {
60  $and .= " OR ";
61  }
62  $and .= $ilDB->like($concat, 'text', '%' . $word . '%');
63  }
64  return $and;
65  }
$counter
global $ilDB

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