Doctrine 1.2.4
Doctrine_Node_NestedSet_PreOrderIterator Class Reference

Inherits Iterator.

Public Member Functions

 current ()
 
 key ()
 
 next ()
 
 rewind ()
 
 valid ()
 

Detailed Description

Definition at line 33 of file PreOrderIterator.php.

Member Function Documentation

Doctrine_Node_NestedSet_PreOrderIterator::current ( )

returns the current record

Returns
Doctrine_Record

Definition at line 124 of file PreOrderIterator.php.

{
$record = $this->collection->get($this->key);
$record->getNode()->setLevel($this->level);
return $record;
}
Doctrine_Node_NestedSet_PreOrderIterator::key ( )

returns the current key

Returns
integer

Definition at line 114 of file PreOrderIterator.php.

{
return $this->key;
}
Doctrine_Node_NestedSet_PreOrderIterator::next ( )

advances the internal pointer

Returns
void

Definition at line 136 of file PreOrderIterator.php.

{
while ($current = $this->advanceIndex()) {
if ($this->maxLevel && ($this->level > $this->maxLevel)) {
continue;
}
return $current;
}
return false;
}
Doctrine_Node_NestedSet_PreOrderIterator::rewind ( )

rewinds the iterator

Returns
void

Definition at line 103 of file PreOrderIterator.php.

{
$this->index = -1;
$this->key = null;
}
Doctrine_Node_NestedSet_PreOrderIterator::valid ( )
Returns
boolean whether or not the iteration will continue

Definition at line 152 of file PreOrderIterator.php.

{
return ($this->index < $this->count);
}

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