ILIAS  release_8 Revision v8.24
ilLikeMetaDataSearch Class Reference
+ Inheritance diagram for ilLikeMetaDataSearch:
+ Collaboration diagram for ilLikeMetaDataSearch:

Public Member Functions

 __createKeywordWhereCondition ()
 
 __createContributeWhereCondition ()
 
 __createTitleWhereCondition ()
 
 __createDescriptionWhereCondition ()
 
- Public Member Functions inherited from ilMetaDataSearch
 setMode (string $a_mode)
 
 getMode ()
 
 performSearch ()
 
 __createInStatement ()
 
 __searchContribute ()
 
 __searchKeywords ()
 
 __searchTitles ()
 
 __searchDescriptions ()
 
- 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.ilLikeMetaDataSearch.php.

Member Function Documentation

◆ __createContributeWhereCondition()

ilLikeMetaDataSearch::__createContributeWhereCondition ( )

Definition at line 56 of file class.ilLikeMetaDataSearch.php.

56 : string
57 {
58 $concat = ' entity ';
59 $where = " WHERE (";
60 $counter = 0;
61 foreach ($this->query_parser->getQuotedWords() as $word) {
62 if ($counter++) {
63 $where .= "OR";
64 }
65 #$where .= $concat;
66 #$where .= (" LIKE ('%".$word."%')");
67 $where .= $this->db->like($concat, 'text', '%' . $word . '%');
68 }
69 return $where . ') ';
70 }

◆ __createDescriptionWhereCondition()

ilLikeMetaDataSearch::__createDescriptionWhereCondition ( )

Definition at line 100 of file class.ilLikeMetaDataSearch.php.

100 : string
101 {
102 $concat = ' description ';
103 $where = " WHERE (";
104 $counter = 0;
105 foreach ($this->query_parser->getQuotedWords() as $word) {
106 if ($counter++) {
107 $where .= "OR";
108 }
109 #$where .= $concat;
110 #$where .= (" LIKE ('%".$word."%')");
111 $where .= $this->db->like($concat, 'text', '%' . $word . '%');
112 }
113 return $where . ') ';
114 }

◆ __createKeywordWhereCondition()

ilLikeMetaDataSearch::__createKeywordWhereCondition ( )

Definition at line 40 of file class.ilLikeMetaDataSearch.php.

40 : string
41 {
42 $concat = ' keyword ';
43 $where = " WHERE (";
44 $counter = 0;
45 foreach ($this->query_parser->getQuotedWords() as $word) {
46 if ($counter++) {
47 $where .= "OR";
48 }
49 $where .= $this->db->like($concat, 'text', '%' . $word . '%');
50 #$where .= $concat;
51 #$where .= (" LIKE ('%".$word."%')");
52 }
53 return $where . ') ';
54 }

◆ __createTitleWhereCondition()

ilLikeMetaDataSearch::__createTitleWhereCondition ( )

Definition at line 71 of file class.ilLikeMetaDataSearch.php.

71 : string
72 {
73
74 /*
75 $concat = ' CONCAT(title,coverage) '; // broken if coverage is null
76 // DONE: fix coverage search
77 $concat = ' title ';
78 */
79
80 $concat = $this->db->concat(
81 array(
82 array('title','text'),
83 array('coverage','text'))
84 );
85
86
87 $where = " WHERE (";
88 $counter = 0;
89 foreach ($this->query_parser->getQuotedWords() as $word) {
90 if ($counter++) {
91 $where .= "OR";
92 }
93 #$where .= $concat;
94 #$where .= (" LIKE ('%".$word."%')");
95 $where .= $this->db->like($concat, 'text', '%' . $word . '%');
96 }
97 return $where . ' )';
98 }

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