ILIAS  release_4-3 Revision
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilLucenePathFilter Class Reference

Lucene path filter. More...

+ Inheritance diagram for ilLucenePathFilter:
+ Collaboration diagram for ilLucenePathFilter:

Public Member Functions

 __construct ($a_root)
 Constructor.
 filter ($a_ref_id)
 Return whether a object reference is valid or not.

Protected Member Functions

 init ()
 Read valid reference ids.

Protected Attributes

 $root = ROOT_FOLDER_ID
 $subnodes = array()

Detailed Description

Lucene path filter.

Author
Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Version
$Id$

Definition at line 34 of file class.ilLucenePathFilter.php.

Constructor & Destructor Documentation

ilLucenePathFilter::__construct (   $a_root)

Constructor.

Parameters
int$a_rootroot id
Returns

Definition at line 45 of file class.ilLucenePathFilter.php.

References init().

{
$this->root = $a_root;
$this->init();
}

+ Here is the call graph for this function:

Member Function Documentation

ilLucenePathFilter::filter (   $a_ref_id)

Return whether a object reference is valid or not.

Parameters
int$a_ref_idreference id of object in question
Returns
boolean

Implements ilLuceneResultFilter.

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

{
if($this->root == ROOT_FOLDER_ID)
{
return true;
}
return in_array($a_ref_id,$this->subnodes);
}
ilLucenePathFilter::init ( )
protected

Read valid reference ids.

Returns

Definition at line 69 of file class.ilLucenePathFilter.php.

Referenced by __construct().

{
global $tree;
if($this->root == ROOT_FOLDER_ID) {
$this->subnodes = array();
}
else
{
$node = $tree->getNodeData($this->root);
$this->subnodes = $tree->getSubTree($node,false);
}
}

+ Here is the caller graph for this function:

Field Documentation

ilLucenePathFilter::$root = ROOT_FOLDER_ID
protected

Definition at line 36 of file class.ilLucenePathFilter.php.

ilLucenePathFilter::$subnodes = array()
protected

Definition at line 37 of file class.ilLucenePathFilter.php.


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