wcmf logo wemove logo

NodeIterator Class Reference
[Model]

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. More...


Public Member Functions

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

Data Fields

 $_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-2009 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 929 2009-02-22 23:20:49Z iherwig

Author:
ingo herwig <ingo@wemove.com>

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


Member Function Documentation

NodeIterator ( &$  obj  ) 

Constructor.

Parameters:
obj The object to start from.

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

& 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:

& 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.

isEnd (  ) 

Find out whether iteration is finished.

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

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

reset ( &$  obj  ) 

Reset the iterator to given object.

Parameters:
obj The object to start from.

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

addToSeenList ( objList  ) 

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

Attention:
Internal use only.
Parameters:
objList An array of objects.

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

Referenced by proceed().


Field Documentation

$_end

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

$_objList

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

$_objIdList

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

$_currentObj

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


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

This page generated via doxygen 1.5.8 Mon Mar 30 01:58:44 2009.
Copyright © 2009 wemove digital solutions GmbH.
sourceforge logo