ILIAS  release_4-4 Revision
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...
 

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  return $tree->isGrandChild($this->root, $a_ref_id);
65  }

◆ init()

ilLucenePathFilter::init ( )
protected

Read valid reference ids.

Returns

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

72  {
73  global $tree;
74 
75  if($this->root == ROOT_FOLDER_ID) {
76  $this->subnodes = array();
77  }
78  else
79  {
80  $node = $tree->getNodeData($this->root);
81  $this->subnodes = $tree->getSubTree($node,false);
82  }
83  }

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: