ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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 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.ilLikeMetaDataSearch.php.

Member Function Documentation

◆ __createContributeWhereCondition()

ilLikeMetaDataSearch::__createContributeWhereCondition ( )

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

49 : string
50 {
51 $concat = ' entity ';
52 $where = " WHERE (";
53 $counter = 0;
54 foreach ($this->query_parser->getQuotedWords() as $word) {
55 if ($counter++) {
56 $where .= "OR";
57 }
58 #$where .= $concat;
59 #$where .= (" LIKE ('%".$word."%')");
60 $where .= $this->db->like($concat, 'text', '%' . $word . '%');
61 }
62 return $where . ') ';
63 }
$counter

References $counter.

◆ __createDescriptionWhereCondition()

ilLikeMetaDataSearch::__createDescriptionWhereCondition ( )

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

92 : string
93 {
94 $concat = ' description ';
95 $where = " WHERE (";
96 $counter = 0;
97 foreach ($this->query_parser->getQuotedWords() as $word) {
98 if ($counter++) {
99 $where .= "OR";
100 }
101 #$where .= $concat;
102 #$where .= (" LIKE ('%".$word."%')");
103 $where .= $this->db->like($concat, 'text', '%' . $word . '%');
104 }
105 return $where . ') ';
106 }

References $counter.

◆ __createKeywordWhereCondition()

ilLikeMetaDataSearch::__createKeywordWhereCondition ( )

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

33 : string
34 {
35 $concat = ' keyword ';
36 $where = " WHERE (";
37 $counter = 0;
38 foreach ($this->query_parser->getQuotedWords() as $word) {
39 if ($counter++) {
40 $where .= "OR";
41 }
42 $where .= $this->db->like($concat, 'text', '%' . $word . '%');
43 #$where .= $concat;
44 #$where .= (" LIKE ('%".$word."%')");
45 }
46 return $where . ') ';
47 }

References $counter.

◆ __createTitleWhereCondition()

ilLikeMetaDataSearch::__createTitleWhereCondition ( )

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

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

References $counter.


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