Go to the documentation of this file.00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00035 include_once 'Services/Search/classes/class.ilMetaDataSearch.php';
00036
00037 class ilLikeMetaDataSearch extends ilMetaDataSearch
00038 {
00039
00044 function ilLikeMetaDataSearch(&$qp_obj)
00045 {
00046 parent::ilMetaDataSearch($qp_obj);
00047 }
00048
00049
00050 function __createKeywordWhereCondition()
00051 {
00052 $concat = ' keyword ';
00053 $where = " WHERE ";
00054 $counter = 0;
00055 foreach($this->query_parser->getQuotedWords() as $word)
00056 {
00057 if($counter++)
00058 {
00059 $where .= "OR";
00060 }
00061 $where .= $concat;
00062 $where .= (" LIKE ('%".$word."%')");
00063 }
00064 return $where;
00065 }
00066
00067 function __createContributeWhereCondition()
00068 {
00069 $concat = ' entity ';
00070 $where = " WHERE ";
00071 $counter = 0;
00072 foreach($this->query_parser->getQuotedWords() as $word)
00073 {
00074 if($counter++)
00075 {
00076 $where .= "OR";
00077 }
00078 $where .= $concat;
00079 $where .= (" LIKE ('%".$word."%')");
00080 }
00081 return $where;
00082 }
00083 function __createTitleWhereCondition()
00084 {
00085 $concat = ' CONCAT(title,coverage) ';
00086 $where = " WHERE ";
00087 $counter = 0;
00088 foreach($this->query_parser->getQuotedWords() as $word)
00089 {
00090 if($counter++)
00091 {
00092 $where .= "OR";
00093 }
00094 $where .= $concat;
00095 $where .= (" LIKE ('%".$word."%')");
00096 }
00097 return $where;
00098 }
00099
00100 function __createDescriptionWhereCondition()
00101 {
00102 $concat = ' description ';
00103 $where = " WHERE ";
00104 $counter = 0;
00105 foreach($this->query_parser->getQuotedWords() as $word)
00106 {
00107 if($counter++)
00108 {
00109 $where .= "OR";
00110 }
00111 $where .= $concat;
00112 $where .= (" LIKE ('%".$word."%')");
00113 }
00114 return $where;
00115 }
00116 }
00117 ?>