ILIAS  Release_4_2_x_branch Revision 61807
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilWikiContentSearch Class Reference

Class ilWikiContentSearch. More...

+ Inheritance diagram for ilWikiContentSearch:
+ Collaboration diagram for ilWikiContentSearch:

Public Member Functions

 ilWikiContentSearch (&$query_parser)
 Constructor public.
performSearch ()
 __createInStatement ()
 __createAndCondition ()
- 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

Class ilWikiContentSearch.

Abstract class for wiki content. Should be inherited by ilFulltextWikiContentSearch

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

Definition at line 35 of file class.ilWikiContentSearch.php.

Member Function Documentation

ilWikiContentSearch::__createAndCondition ( )

Definition at line 94 of file class.ilWikiContentSearch.php.

{
echo "Overwrite me!";
}
ilWikiContentSearch::__createInStatement ( )

Definition at line 76 of file class.ilWikiContentSearch.php.

References $in, and ilAbstractSearch\getFilter().

Referenced by performSearch().

{
if(!$this->getFilter())
{
return '';
}
else
{
$type = "('";
$type .= implode("','",$this->getFilter());
$type .= "')";
$in = " AND parent_type IN ".$type;
return $in;
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilWikiContentSearch::ilWikiContentSearch ( $query_parser)

Constructor public.

Definition at line 42 of file class.ilWikiContentSearch.php.

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

Referenced by ilFulltextWikiContentSearch\ilFulltextWikiContentSearch().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

& ilWikiContentSearch::performSearch ( )

Reimplemented from ilAbstractSearch.

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

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

{
$this->setFields(array('content'));
$where = $this->__createWhereCondition();
$locate = $this->__createLocateString();
$query = "SELECT page_id,parent_id,parent_type ".
$locate.
"FROM page_object, il_wiki_page ".
$where.
"AND il_wiki_page.id = page_object.page_id ".
$in;
$res = $this->db->query($query);
while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
{
$this->search_result->addEntry($row->parent_id,$row->parent_type,$this->__prepareFound($row),$row->page_id);
}
}

+ Here is the call graph for this function:


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