wCMF  3.6
 All Classes Namespaces Files Functions Variables Groups Pages
NodeIterator Class Reference

Public Member Functions

 NodeIterator (&$obj)
 
proceed ()
 
getCurrentObject ()
 
 isEnd ()
 
 reset (&$obj)
 
 addToSeenList ($objList)
 

Public Attributes

 $_end
 
 $_objList
 
 $_objIdList
 
 $_currentObj
 

Detailed Description

NodeIterator is used to iterate over a tree/list build of objects using a Depth-First-Algorithm. Classes used with the NodeIterator must implement the getChildren() and getOID() methods. NodeIterator implements the 'Iterator Pattern'. The base class NodeIterator defines the interface for all specialized Iterator classes.

wCMF - wemove Content Management Framework Copyright (C) 2005-2014 wemove digital solutions GmbH

Licensed under the terms of any of the following licenses at your choice:

See the license.txt file distributed with this work for additional information.

Id:
class.NodeIterator.php 1462 2014-02-04 23:52:27Z iherwig
Author
ingo herwig ingo@.nosp@m.wemo.nosp@m.ve.co.nosp@m.m

Definition at line 32 of file class.NodeIterator.php.

Member Function Documentation

NodeIterator::NodeIterator ( $obj)

Constructor.

Parameters
objThe object to start from.

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

& NodeIterator::proceed ( )

Proceed to next object. Subclasses may override this method to implement spezial traversion algorithms.

Returns
A reference to the NodeIterator.

Definition at line 54 of file class.NodeIterator.php.

References addToSeenList().

+ Here is the call graph for this function:

& NodeIterator::getCurrentObject ( )

Get the current object. Subclasses may override this method to return only special objects.

Returns
A reference to the current object.

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

References $_currentObj.

NodeIterator::isEnd ( )

Find out whether iteration is finished.

Returns
'True' if iteration is finished, 'False' alternatively.

Definition at line 84 of file class.NodeIterator.php.

References $_end.

NodeIterator::reset ( $obj)

Reset the iterator to given object.

Parameters
objThe object to start from.

Definition at line 92 of file class.NodeIterator.php.

NodeIterator::addToSeenList (   $objList)

Add objects, only if they are not already in the internal processed object list.

Attention
Internal use only.
Parameters
objListAn array of objects.

Definition at line 105 of file class.NodeIterator.php.

Referenced by proceed().

Member Data Documentation

NodeIterator::$_end

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

Referenced by isEnd().

NodeIterator::$_objList

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

NodeIterator::$_objIdList

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

NodeIterator::$_currentObj

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

Referenced by getCurrentObject().


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