ILIAS  Release_4_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilMediaPoolSearch Class Reference
+ Inheritance diagram for ilMediaPoolSearch:
+ Collaboration diagram for ilMediaPoolSearch:

Public Member Functions

 ilMediaPoolSearch (&$query_parser)
 Constructor public.
performSearch ()
 performKeywordSearch ()
- 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
 setIdFilter ($a_id_filter)
 Set id filter Filters search by given object id.
 getIdFilter ()
 Get Id filter.
 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 17 of file class.ilMediaPoolSearch.php.

Member Function Documentation

ilMediaPoolSearch::ilMediaPoolSearch ( $query_parser)

Constructor public.

Definition at line 23 of file class.ilMediaPoolSearch.php.

References ilAbstractSearch\$query_parser, and ilAbstractSearch\ilAbstractSearch().

Referenced by ilFulltextMediaPoolSearch\ilFulltextMediaPoolSearch(), and ilLikeMediaPoolSearch\ilLikeMediaPoolSearch().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilMediaPoolSearch::performKeywordSearch ( )

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

References $query, $res, $row, ilAbstractSearch\$search_result, ilAbstractSearch\__createLocateString(), DB_FETCHMODE_OBJECT, and ilAbstractSearch\setFields().

{
$this->setFields(array('keyword'));
$and = $this->__createKeywordAndCondition();
$locate = $this->__createLocateString();
$query = "SELECT mep_id, child ".
$locate.
"FROM mep_item mi ".
"JOIN mep_tree ON mi.obj_id = child ".
"JOIN il_meta_keyword mk ON foreign_id = mk.obj_id ".
$and.
"AND obj_type = 'mob'";
$res = $this->db->query($query);
while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
{
$this->search_result->addEntry($row->mep_id,'mep',$this->__prepareFound($row),$row->child);
}
}

+ Here is the call graph for this function:

& ilMediaPoolSearch::performSearch ( )

Reimplemented from ilAbstractSearch.

Definition at line 30 of file class.ilMediaPoolSearch.php.

References $query, $res, $row, ilAbstractSearch\$search_result, ilAbstractSearch\__createLocateString(), DB_FETCHMODE_OBJECT, and ilAbstractSearch\setFields().

{
$this->setFields(array('title'));
$and = $this->__createAndCondition();
$locate = $this->__createLocateString();
$query = "SELECT mep_id,obj_id ".
$locate.
"FROM mep_tree JOIN mep_item ON child = obj_id ".
$and;
$res = $this->db->query($query);
while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
{
$this->search_result->addEntry($row->mep_id,'mep',$this->__prepareFound($row),$row->obj_id);
}
}

+ Here is the call graph for this function:


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