ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
ilLucenePathFilter Class Reference

Lucene path filter. More...

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

Public Member Functions

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

Protected Member Functions

 init ()
 Read valid reference ids. More...
 

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

◆ __construct()

ilLucenePathFilter::__construct (   $a_root)

Constructor.

Parameters
int$a_rootroot id
Returns

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

46 {
47 $this->root = $a_root;
48 //$this->init();
49 }

Member Function Documentation

◆ filter()

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.

57 {
58 global $tree;
59
60 if($this->root == ROOT_FOLDER_ID)
61 {
62 return true;
63 }
64 if($this->root == $a_ref_id)
65 {
66 return TRUE;
67 }
68 return $tree->isGrandChild($this->root, $a_ref_id);
69 }

◆ init()

ilLucenePathFilter::init ( )
protected

Read valid reference ids.

Returns

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

76 {
77 global $tree;
78
79 if($this->root == ROOT_FOLDER_ID) {
80 $this->subnodes = array();
81 }
82 else
83 {
84 $node = $tree->getNodeData($this->root);
85 $this->subnodes = $tree->getSubTree($node,false);
86 }
87 }

Field Documentation

◆ $root

ilLucenePathFilter::$root = ROOT_FOLDER_ID
protected

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

◆ $subnodes

ilLucenePathFilter::$subnodes = array()
protected

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


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